Umlaut on US Keyboard Layout (Linux + Mac)
This is for Swiss, German and Austrian keyboard users (or anyone who needs ä ö ü ß é) who want to type on a plain US layout because []{}~\/| are one keystroke there, but still need umlauts for German and French text without switching layouts.
Belwo shows how I typeä ö ü(and— « »`, you can just extend to your own liking) while keeping the US keyboard layout on every keyboard: Lenovo/Tuxedo laptop, Kanata, KBDfans DZ65RGB, Kinesis, and on Mac with Karabiner-Elements (see My Mechanical Keyboards for what keyboards I use).
I use Caps Lock as a hidden layer
Caps Lockis never Caps Lock in my setup, but the compose / umlaut key: tapCaps, thena→ä. HoldShiftforÄ.
Real Caps Lock lives on both Shifts pressed together (Omarchy defaultshift:both_capslock_cancel).
Why US layout: []{}~\|/ are all one keystroke, which matters more for coding, especially as I’m a huge Neovim and Vim Motions users in every app I can, and writing in English, I don’t use umlaut ( ä ö ü) that often anymore.
But ocassionaly, when writing in German or Swiss German, I need them. Below is about how I did that on my Mac before, and now on my Linux setup with Omarchy.
On Mac I earlier tough I still used Swiss keyboard layout (standard de_CH keymap via Ukelele), I only swithced later, see details in Correct Swiss German Keyboard Layout.
# Linux (Omarchy / Hyprland)
On Omarchy I have three layer for keyboard optimizations:
| Layer | Does | Config |
|---|---|---|
| Hyprland / xkb | makes Caps Lock the compose key (Multi_key) |
Omarchy default kb_options = compose:caps,shift:both_capslock_cancel |
| XCompose | turns Multi_key + a into ä |
XCompose/.XCompose |
| Kanata | switchign between aptop and kinesis layout: Caps = tap for compose, hold for nav layer; swaps Alt/Super |
kanata/.config/kanata/lenovo.kbd,
kanata/.config/kanata/kinesis.kbd |
# 1. XCompose (the easy part, works for any keyboard)
XCompose, stowed (with stow) from dotfiles lives at ~/.XCompose.
|
|
See live version at dotfiles/XCompose/.XCompose at master · sspaeti/dotfiles · GitHub
- Reload after edits:
refresh-xcompose(Omarchy command), or restart the app. - Compose key is set in Omarchy’s default
input.lua(compose:caps). No change needed in my owninput.lua. - Works in GTK, Qt, terminals, Electron (Obsidian), browsers. Does not work in apps that grab raw keycodes (some games, VMs).
Typing: tap Caps, release, tap a → ä. Shift+a after Caps → Ä.
# 2. Kanata (laptop keyboard)
Runs as root systemd service (/etc/systemd/system/kanata.service, needs uinput). Active config is ~/.config/kanata/kanata.kbd, which is a copy of lenovo.kbd or kinesis.kbd. Toggle with SUPER + ALT + BACKSPACE (switch-keyboard script in
dotfiles/hypr, sudoers NOPASSWD for the cp + systemctl restart kanata).
What lenovo.kbd does for umlauts:
|
|
- Tap Caps → sends real
capskeycode → Hyprland sees compose key → XCompose does the umlaut. Kanata does not know about umlauts at all. - Hold Caps →
caps-layer: F1-F12 on number row,hjklarrows,y/u/i/o= Home / Ctrl-Left / Ctrl-Right / End. - Base layer also swaps
lalt↔lmet(Super next to space, Mac style) andy↔z(QWERTZ keycaps on the laptop).
Kanata grabs all keyboards
defcfghas nolinux-devfilter, so the KBDfans and Kinesis go through kanata too. Consequences:
- the Alt/Super swap also applies to the KBDfans. Firmware
LAlt+Oarrives in Hyprland asSUPER+O(opens the file manager). That is how I found this on 2026-11-03.- a quick Caps tap from a keyboard macro passes through the tap-hold fine (<200 ms), so VIA macros below still work.
- to exclude a board:
linux-dev-names-exclude ("DZTECH DZ65RGBV3")indefcfg. Not done yet, firmware mapping assumes the swap.
# 3. KBDfans DZ65RGB V3 (QMK + VIA)
Full flash / setup story in Flash my KBD Fans DZ65RGB Keyboard. Layout backup:
qmk/dz65rgb_v3/dz65rgb_v3.layout.json, load it in
VIA → Save + Load → Load. Saves to EEPROM instantly, no flashing.
Problem: on this board Caps is MO(1) (the Fn key), so the Caps keycode never reaches Linux and compose never fires. Solution: VIA macros that replay “tap Caps, tap letter”, assigned on layer 1:
| Slot | Macro | Key (Caps +) | Output |
|---|---|---|---|
| M0 | {KC_CAPS}{KC_A} |
A |
ä |
| M1 | {KC_CAPS}{KC_U} |
U |
ü |
| M2 | {KC_CAPS}{KC_O} |
O |
ö |
| M3 | {KC_CAPS}{KC_MINS} |
\ |
— |
| M4 | {KC_CAPS}{KC_LSFT,KC_COMM} |
; |
« |
| M5 | {KC_CAPS}{KC_LSFT,KC_DOT} |
' |
» |
- VIA macro syntax:
{KC_A}{KC_B}= sequential taps,{KC_A,KC_B}= chord,{+KC_A}/{-KC_A}= press / release. The macro recorder produces{+KC_CAPS}{-KC_CAPS}{+KC_A}{-KC_A}, same thing. - Easiest way to create them: VIA → Macros → Record, then on the laptop keyboard press
Caps,a(kanata emits the plain caps tap). Save. Or just load the JSON above. - Uppercase: hold Shift while pressing
Caps + A→Ä(Shift stays held through the macro, XCompose has the<A>rules). - The old
A(KC_A)/A(KC_O)/A(KC_U)mapping on layer 1 is a macOS leftover (Left Option + letter → Karabiner-Elements rule). On Linux it never produced an umlaut.
Find more troubelshoot or infos Flash my KBD Fans DZ65RGB Keyboard.
# Mac
# Karabiner-Elements (US layout, umlaut via Caps)
Karabiner-Elements complex modification “Convert Caps Lock (in combination with Shift) with [aou] to [ÄÖÜ]” from KE-complex_modifications, config in dotfiles/karabiner.
- Laptop: Caps + a/o/u → ä/ö/ü, with Shift → Ä/Ö/Ü.
- KBDfans: firmware layer 1 sends
LAlt + a/o/u(that is theA(KC_A)mapping still in the JSON), Karabiner rule maps Left Option + letter → umlaut. - If umlauts stop working: check skhd does not bind
alt + a/o/u. - Karabiner updates have broken complex modifications before, see Karabiner-Elements.
# Ukelele (keep Swiss layout instead)
The other approach: keep de_CH and fix Apple’s non-standard placement of []{}~\ with a custom keymap built in Ukelele (brew install --cask ukelele). Documented in Correct Swiss German Keyboard Layout. I moved away from this to US layout + Caps compose, which is the same muscle memory on Linux and Mac.
# Cheat sheet
| Want | Laptop (Linux) | KBDfans (Linux) | Mac |
|---|---|---|---|
| ä ö ü | tap Caps, letter |
Caps + letter (held, layer 1) |
Caps + letter |
| Ä Ö Ü | tap Caps, Shift+letter |
Shift + Caps + letter |
Shift + Caps + letter |
| — | tap Caps, - |
Caps + \ |
— |
| « » | tap Caps, < / > |
Caps + ; / ' |
— |
| 😄 etc. | tap Caps, m, s |
same via firmware? no, type on laptop | — |
| real Caps Lock | both Shifts | both Shifts | Karabiner setting |
Origin: Flash my KBD Fans DZ65RGB Keyboard
Category: Neovim & Terminal
References: XCompose, Kanata, Karabiner-Elements, Correct Swiss German Keyboard Layout, My KBDFans DZ65RGB, Omarchy