Skip to content

Open launchers typed on the MacBook keyboard on the MacBook screen - #593

Merged
maralcbr merged 2 commits into
quattro-upstreamfrom
mac/91-builtin-keyboard-screen
Sep 26, 2026
Merged

maralcbr merged 2 commits into
quattro-upstreamfrom
mac/91-builtin-keyboard-screen

Conversation

@maralcbr

Copy link
Copy Markdown
Member

Ticket 91. With an external monitor attached, Super+Space and other launchers pressed on the MacBook's own keyboard now open on the MacBook screen; an external keyboard keeps opening them on the focused screen.

How: Hyprland 0.56 binds accept device = { list = ... }, and every bind matching a press runs in the order it was added. On Apple Silicon, o.bind puts a bind scoped to the built-in keyboard (apple-spi-keyboard on M1, apple-mtp-keyboard on M2+) ahead of each launcher (menus, shell panels, { omarchy/launch/webapp/tui } apps, calculator, agent picker). It focuses the enabled eDP-* monitor if it isn't focused already, which also moves the pointer there. No input is read outside Hyprland's own bind matching. Clamshell/mirror: disabled or mirrored panels aren't in hl.get_monitors(), so nothing changes. Toggles, captures, tiling and locked binds are untouched; the extra binds have no description, so the keybindings menu hides them. Manual note in 33-monitors.

Tests: new hyprland-builtin-keyboard-screen-test.sh (bind order and scope, non-launchers, off-Apple, focus in external/built-in-only/clamshell layouts); binding-conflicts test now treats keyboard-scoped binds like release halves and checks the Apple set. All hyprland-* and keybinding tests pass on the M1 Pro; the config loads with Hyprland --verify-config (0.56.2). Full shell suite on the M1 Pro: only env failures (no node, no omarchy-pkgs checkout) plus snapshot-restore-mac-test hanging there, unrelated.

Second review: found missed bar-panel/agent launchers (fixed) and the pointer warp (documented); the rest checked out against Hyprland source.

Needs an owner check on the M2 with an external monitor (steps in the ticket report).

Hyprland 0.56 binds can be scoped to named keyboards and every bind matching a press runs in the order it was added. On Apple Silicon each launcher bind gets a bind ahead of it, scoped to the built-in keyboard, that focuses the enabled built-in panel. External keyboards and clamshell keep opening on the focused screen.
@maralcbr
maralcbr merged commit 7b7a4e1 into quattro-upstream Sep 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant