QMK keyboard us(international) layout for programming with german umlauts (Deutsche Umlaute)

  1. 1. goal
  2. 2. reason
  3. 3. requisits
  4. 4. method
  5. 5. steps
    1. 5.1. Set keyboard layout to us altgr-intl
    2. 5.2. Install QMK tools and firmware
    3. 5.3. Find your keyboards name/path
    4. 5.4. Create a new keymap
    5. 5.5. Setting defaults for QMK tools
    6. 5.6. Test compilation
    7. 5.7. Modify Keymap
    8. 5.8. Compile and Flash
  6. 6. lesson

goal

Using us layout with modifier key for umlauts
Hold Capslock and press a,o,u,s for ä,ö,ü,ß

reason

We want to use us layout for better access to often used symbols []{}()><
We want be able to write umlauts in an intuitive way
We dont want to use dead keys which lead to additional keystrokes to type ~”

requisits

  • A QMK compatible keyboard
  • A OS supporting altgr-intl (right alt international) layout

method

We are going to use a combination of:

  • the os keyboard layout “us altgr-intl”
  • the QMK firmware to add already “altgr” modified KeyCodes to a Layer we will access by holding a modifier key

steps

Set keyboard layout to us altgr-intl

This step depends on your OS. I changed the default for my Xserver with:

1
$ sudo localectl set-x11-keymap us pc105 altgr-intl

Install QMK tools and firmware

Follow the setup instructions of the fine documentation of QMK

Find your keyboards name/path

Find your keyboards name/path with (in my case: dztech/dz60rgb/v2)

1
$ qmk list-keyboards

Create a new keymap

It seems to be a used practive to chose ones github name as keymapname

1
$ qmk new-keymap -kb <YOUR-KEYBOARD-NAME> -km <YOUR-KEYMAP-NAME>

Setting defaults for QMK tools

Set your found keyboard name/path as default with

1
$ qmk config set user.keyboard=<YOUR-KEYBOARD-NAME>
1
$ qmk config set user.keymap=<YOUR-KEYMAP-NAME>

Check the config

1
$ qmk config 

It should show your keyboard, keymap and the correct path to qmk_firmware

Test compilation

1
$ qmk compile

Modify Keymap

Open your keymap.c file in a texteditor

1
$ vim <PATH-TO-QMK_FIRMWARE>/keyboards/<YOUR-KEYBOARD-NAME>/keymaps/<YOUR-KEYMAP-NAME>/keymap.c

In Layer 0: We replace Capslock with:

1
2
LT(1, KC_ESC) // to additionaly replace capslock with ESC when tapped
LT(1, KC_CAPS) // to only switch to layer 1 if held and capslock when tapped

In Layer 1: We replace the Keycodes after [1] Layout with:

1
2
3
4
RALT(KC_Q) // for ä at position a
RALT(KC_S) // for ß at position s
RALT(KC_Y) // for ü at position u
RALT(KC_P) // for ö at position o

and add the left shift keys keycode to this layer to be indenpend of modifier order to get uppercase umlauts

1
KC_RSFT // for right shift at position right shift

Compile and Flash

Compile the keymap with:

1
$ qmk compile 

Set your keyboard into flash mode. This depends on your model. I have to press MOD 1 + \

Flash the new keymap

1
$ qmk flash 

lesson

We learned that a keymap programmed on keyboard always has to go with a layout setup in the os to translate keycodes to the correct/intended symbols.
We learned to use the qmk tool to modify the keymap directly in c code.