German characters, Linux and Windows

Just in case you haven’t noticed: I’m german, and that requires to type some german characters, like ä, ö and ü (and ß) from time to time.

One problem with that: qmk takes a keypress and translates it to a keycode to be sent to the operating system. The operating system takes the keycode and translates it to a character based on the selected keyboard layout. So, if you press „Z“ on an US keyboard, it emits keycode 52, which will be translated to the letter „Z“ using the US keycode-to-character translation map.

On a german keyboard, it gets translated to „Y“. But also, SHIFT+2 is translated to @ with the US layout, and to ‚“‚ (double quote) with the german layout.

To make things worse, these translations are not consistent across operating systems; the key combinations with „AltGr“ (the right Alt key, which is different from the left Alt key in the german layout) are not the same translations on Linux and Windows.

My solution is to use the US International layout with Windows and Linux, and to remap the keys in Linux using xmodmap:

keycode 24 = q Q q Q adiaeresis Adiaeresis at Greek_OMEGA q Q
keycode 26 = e E e E EuroSign EuroSign e E e E
keycode 29 = y Y y Y udiaeresis Udiaeresis leftarrow yen y Y
keycode 33 = p P p P odiaeresis Odiaeresis thorn THORN p P
keycode 39 = s S s S ssharp U1E9E U017F U1E9E s S

This is the bare minimum needed for the umlauts to work; still need to find the switch for Windows not to treat the double quote as dead character though.

Hinterlasse einen Kommentar.

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.