mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-06-21 07:44:48 +03:00
Hardware-generated arrow key events on macOS carry the NumericPad and SecondaryFn flags in addition to any user-pressed modifiers. CGEventTap- based hotkey matchers (tiling window managers, accessibility tools, etc.) commonly check those flags to disambiguate navigation arrows from generic chords, and reject events that lack them. Before this change, synthesized Option+Arrow chords were silently swallowed by the focused application instead of being captured by the window manager, because the events arrived with only the Alternate flag set. Hardware Option+Arrow chords on the local keyboard worked because the OS itself set the missing flags. Add NumericPad + SecondaryFn to the flags posted with arrow key events (Mac key codes 0x7B-0x7E) so synthesized arrow chords match hardware chords on the wire. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>