Optionally send media keys to Omarchy while it is focused - #314
Draft
NimbleAINinja wants to merge 13 commits into
Draft
NimbleAINinja wants to merge 13 commits into
NimbleAINinja wants to merge 13 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A listen-only HID tap on the M1 Max built-in keyboard and a Magic Keyboard A1843 confirmed the F4-F6 keycodes. F4 sends 177 on built-in keyboards (Spotlight) and 131 on the Magic Keyboard (Launchpad), so the Spotlight / Launchpad row now matches both. F5 and F6 on built-in keyboards are dedicated Dictation/Siri (176) and Do Not Disturb (178) caps rather than plain function keys, so they get their own rows, defaulting to macOS like every other row. The new default host-key list is 131,144,145,160,176,177,178. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DP6vwz7aaUNRSuNGLgRqTB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DP6vwz7aaUNRSuNGLgRqTB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DP6vwz7aaUNRSuNGLgRqTB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DP6vwz7aaUNRSuNGLgRqTB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Stacked on #313 — the first seven commits here are that PR; only the last six are new. Draft until it merges.
Second part of the follow-up to #249 ("defaults for display brightness and media controls"). The Keyboard sheet gains a Media row: previous, play/pause and next (F7–F9) can go to Omarchy while its window has the keyboard. It defaults to macOS, so nothing changes unless someone opts in. Volume, mute, brightness and keyboard backlight always stay with macOS.
NX_SYSDEFINEDaux-control events, which full grab's tap does not capture. A new Cocoa patch,qemu-cocoa-media-keys.patch(applied right after the host-keys patch), adds amedia-keys=on|offdisplay option. When on, the tap also takes those events, decodes the three transport keys and sends them through the keyboard state tracker asaudioprev/audioplay/audionext; everything else is returned to macOS. With the option off the tap's event mask is unchanged.KeyboardRoutingLaunchConfigurationpublishesOMARCHY_QEMU_GPU_MEDIA_KEYS(0/1);run-qemu-gpu.shvalidates it, checks the capability and appends,media-keys=ononly when enabled.omarchy-shell media.I first tried this in the
--bridge-command-superhelper, but nothing launches that helper any more and it would hold QEMU's single QMP client, so it lives in the Cocoa tap instead.As with the first PR, #279's Cocoa patch overlaps this one's context and whichever merges second needs a mechanical refresh.
Testing
Run on the branch as submitted plus two local planning documents (no code difference), on an M1 Max MacBook Pro, macOS 27:
make test: exit 0.make build: exit 0. The bundled QEMU's-helplists[,host-keys=code:code...][,media-keys=on|off].git diff --check origin/main: clean.test-cocoa-media-keys.py); launch environment; launcher scenarios for on, off and an invalid value; preference migration; sheet and row.Not done: no screenshots attached yet. Not tested on macOS 15.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DP6vwz7aaUNRSuNGLgRqTB