Repository navigation
Conversation
On Apple Silicon MacBooks the built-in keyboard sends media keysyms for the top row: the hid-apple table for 2021 and later Apple keyboards maps F1..F12 to brightness, Mission Control, Spotlight, dictation, Do Not Disturb, previous/play/next, mute and volume, and fnmode=1 makes that the bare press. omacom#215 renamed the two brightness keys so Shift+F1/F2 showed as the keys you press, but the rest of the row still leaked as raw symbols: 28 rows read XF86AudioMute, XF86AudioRaiseVolume, XF86AudioMicMute and so on, including the fork's own "Screenshot ... (Apple top row)" binds. Extend the renaming to the full row (F3 XF86LaunchA, F4 XF86Search, F5 XF86AudioMicMute, F6 XF86Sleep, F7-F9 XF86AudioPrev/Play/Next, F10 XF86AudioMute, F11/F12 XF86AudioLowerVolume/RaiseVolume), matched on whole symbols so nothing else is touched, and bump the render cache version. Keysyms the built-in keyboard does not have (XF86Calculator, XF86Eject, XF86KbdBrightness*, XF86Touchpad*) keep their names. Verified on a MacBook Pro 14" M1 Max against the live binds: "SUPER + XF86AudioMute -> Screenshot Window (Apple top row)" now reads "SUPER + F10", "XF86AudioMicMute -> Mute microphone" reads "F5". Fixes omacom#194 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Data point from a MacBook Air M4 (J713) running the community Omarchy-M4-Native port on official Omarchy 4.5.0-2 (not this fork): the problem is still present upstream. So this looks worth carrying regardless of what upstream does next. |
Author
|
Replaced by omacom/omarchy-mac-pkgs#105, which puts the names in the platform key-names file that mainline Omarchy reads instead of hard-coding them in the menu script. |
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.
Problem
#215 made Shift+F1/F2 show as the keys you press, but the rest of the Apple top row still leaks raw keysyms into Super+K. On a stock quattro install here, 28 rows read
XF86AudioMute,XF86AudioRaiseVolume,XF86AudioMicMute,XF86AudioPlay…, including the fork's ownSUPER + XF86AudioMute → Screenshot Window (Apple top row)binds that exist precisely because the Mac keyboard sends those symbols.Why these names are right
Asahi's
hid-appleroutes built-in keyboards (BUS_SPI/BUS_HOST) throughmagic_keyboard_2021_and_2024_fn_keys, andfnmode=1(what the fork sets) makes the media function the bare press:(xkb's evdev keycode map confirms the keysym for each KEY_* code.) The only exception in the driver is the 13" MacBook Pro 2020/2022 with a Touch Bar, which has no physical F row at all; the menu's F-key names are no worse there than today's F1/F2.
Change
parse_keycodes()renames the full row from a table, matched on whole symbols (\<…\>), so e.g.XF86AudioPlaynever touches another symbol and keysyms the built-in keyboard does not have (XF86Calculator,XF86Eject,XF86KbdBrightness*,XF86Touchpad*,XF86PowerOff) keep their names.test/shell.d/menu-keybindings-fkeys-test.shextended with rows for F3, F5, F6, F8 and F10 and a non-Apple keysym that must stay raw.Verified
MacBook Pro 14" M1 Max (j314), live
hyprctl binds:omarchy-menu-keybindings --printnow showsSUPER + F10 → Screenshot Window (Apple top row),F5 → Mute microphone,SHIFT + F8 → Switch media source,F11 → Volume down, and so on;menu-keybindings-fkeys-test,keybindings-menu-testandmenu-testpass;omarchy commands --checkpasses.One thing left visible, deliberately out of scope: rows bound to the real F-keys (
SUPER + F10 → Screenshot Window, voxtype'sF9) now sit next to their media-key twins. Underfnmode=1those need Fn held, so a follow-up could render them asFN + F10on Apple keyboards.Fixes #194
🤖 Generated with Claude Code