Creating a keyboard remapping tutorial

Because they are different keys, even if they end up resulting in the same symbol: Key_7 is the normal 7 key on a keyboard, Key_Keypad7 is the 7 on the numpad. The reason there are two keys for seemingly the same thing is how they behave with other modifiers present: Shift+Key_7 is typically &, while Shift+Key_Keypad7 is Home.

They aren’t defined in the keymap, this is something the operating system manages. What a shifted symbol will represent depends on what layout your operating system is configured to use. For example, Shift+4 is $ on US-QWERTY, but ! on HU-QWERTZ. Sadly we do not have complete control over this. There are workarounds and tricks to change this behaviour on the firmware side, but those are just that: workarounds.

___ represents “transparent” keys: when you press a key marked with this in the keymap, the firmware will look at all the layers below it, until it finds a non-transparent key. XXX marks a key as unused.

In other words, if on one layer you have a ___ key, and on the base layer, that key is - say - Key_A, when you press the key while on the layer, it will still result in A. If we’d mark it as XXX, it would result in no key being input. This is so that one can make partial layers. This is useful for a whole lot of things, which should be explained at some point (I’m lacking the time to do so now).

It looks like I’ll have some time this weekend, so I’ll try to put together a short intro guide, a kind of step-by-step thing, starting from the factory firmware.

2 Likes