Apple keyboard layout breaks when combining altwin:swap_alt_win with lv3:*_switch #6407
Unanswered
joaopmpinheiro
asked this question in
Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Apple keyboard layout breaks when combining
altwin:swap_alt_winwithlv3:*_switchEnvironment
kb_layout = pt,kb_variant = mac,kb_model = appleExpected behavior
Right Option key should act as pure AltGr (
Mod5/ISO_Level3_Shift) to type brackets,@,#, etc. — matching real macOS keyboard behavior:Actual behavior
Combining
altwin:swap_alt_win,lv3:ralt_switch(orlv3:rwin_switch) inkb_optionscauses the right Option key to emit bothMod1(Alt) andMod5(Level3) simultaneously. Confirmed viawev:Because
xkb_optionsare additive rather than a clean override,altwin:swap_alt_winalready claims that keycode forAlt_R/Mod1, and thelv3:*_switchoption just layersMod5on top instead of replacing it. This double-modifier state causes AltGr combos to misfire — either triggering unrelated app shortcuts (e.g. browser Alt-accelerators) or firing unrelated Hyprland keybinds (e.g. a clipboard/paste bind) instead of producing the intended character.Workaround
Define a custom xkb symbols file that explicitly remaps all 4 modifier keycodes in one pass, instead of stacking
altwin:swap_alt_win+lv3:*_switch:/usr/share/X11/xkb/symbols/macmods:/usr/share/X11/xkb/rules/evdev, alongside the existinglv3:*option lines:input.conf:hyprctl reload(or full logout/login to be safe).After this,
wevconfirms the right Option key producesMod5only (no leftoverMod1), and AltGr combos (brackets,@,#, etc.) work correctly in both native Wayland and XWayland apps.Suggestion
It would be great if Omarchy shipped a built-in preset (e.g.
kb_options = macmods:applealtgr, or equivalent bundled xkb rule) for people using real Apple keyboards or mac-layout emulation, since thealtwin:swap_alt_win+lv3:*_switchcombination is likely to silently break AltGr for anyone usingkb_model=applealongside a non-US layout that relies on AltGr for common characters (brackets,@,#, etc.).All reactions