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 |
LT(1, KC_ESC) // to additionaly replace capslock with ESC when tapped |
In Layer 1: We replace the Keycodes after [1] Layout with:
1 |
RALT(KC_Q) // for ä at position a |
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.