Fixes and ergonomic shortcuts for using the ADNW keyboard layout on macOS with Karabiner-Elements.
Custom keyboard layouts like ADNW define a command keymap that remaps keys when Cmd is held. This causes issues:
- Chrome's
Cmd+Shift+T(Reopen Closed Tab) breaks because keycode 17 maps toa-umlautinstead oftin ADNW's command keymap - Other shortcuts need remapping to match ADNW's ergonomic key positions
Temporarily switches to US layout, sends the keystroke, then switches back. The layout switch is instant and invisible.
Maps to ADNW home row positions:
Cmd+I(ADNW position) -> Cut (Cmd+X)Cmd+E(ADNW position) -> Copy (Cmd+C)Cmd+A(ADNW position) -> Paste (Cmd+V)
Cmd+Opt+ home row keys -> digits 0-9- Mapping: t=4, r=5, n=6, g=7, c=8, l=9, m=3, w=2, p=1, space=0
Opt+P-> %Opt+Z-> ;
Cmd+R-> Previous tab (Opt+Cmd+Left)Cmd+N-> Next tab (Opt+Cmd+Right)Cmd+Fn+Left/Right-> Word jumpingCmd+Shift+Fn+Left/Right-> Word selectionCmd+A-umlaut-> Search selected word in new tab
- Save
adnw_karabiner_rules.jsonto~/.config/karabiner/assets/complex_modifications/ - Open Karabiner-Elements Settings -> Complex Modifications -> Add rule
- Enable the rules you want
- Update the
input_source_idconditions to match your layout's identifier - Adjust
key_codevalues infromfields to match your physical key positions - Find your layout's
input_source_idin Karabiner EventViewer -> Variables tab
The core workaround for layout-related shortcut issues is temporarily switching to the US layout:
"to": [
{ "select_input_source": { "input_source_id": "^com\\.apple\\.keylayout\\.US$" } },
{ "key_code": "t", "modifiers": ["command", "shift"] },
{ "select_input_source": { "input_source_id": "^org\\.unknown\\.keylayout\\.DeutschADNW$" } }
]This switch is instant and invisible to the user.