or go to full-text search page →

Search

Search IconIcon to open search

Umlaut on US Keyboard Layout (Linux + Mac)

Last updatedUpdated: by Simon Späti · CreatedCreated: · 6 min read · growing Note status Growing. Worked on quite a bit, still rough. Expect bullets, gaps and views that update. Estimated from edit history · 1 session · 1,271 words · How my notes grow Recent changes 6 days ago published · 1226 words

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 Lock is never Caps Lock in my setup, but the compose / umlaut key: tap Caps, then a → ä. Hold Shift for Ä.
Real Caps Lock lives on both Shifts pressed together (Omarchy default shift: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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
include "%H/.local/share/omarchy/default/xcompose"   # emoji (Compose m s = 😄), Compose space space = —, includes %L

<Multi_key> <a> : "ä"
<Multi_key> <o> : "ö"
<Multi_key> <u> : "ü"
<Multi_key> <A> : "Ä"
<Multi_key> <O> : "Ö"
<Multi_key> <U> : "Ü"

<Multi_key> <minus>   : "—"
<Multi_key> <less>    : "«"
<Multi_key> <greater> : "»"

<Multi_key> <space> <n> : "Simon Späti"     # text snippets

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 own input.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:

1
2
3
(defalias
  caps-key (tap-hold 200 200 caps (layer-while-held caps-layer))
)
  • Tap Caps → sends real caps keycode → 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, hjkl arrows, y/u/i/o = Home / Ctrl-Left / Ctrl-Right / End.
  • Base layer also swaps lalt ↔ lmet (Super next to space, Mac style) and y ↔ z (QWERTZ keycaps on the laptop).

Kanata grabs all keyboards

defcfg has no linux-dev filter, so the KBDfans and Kinesis go through kanata too. Consequences:

  • the Alt/Super swap also applies to the KBDfans. Firmware LAlt+O arrives in Hyprland as SUPER+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") in defcfg. 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 the A(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