I’m updating the layout of my freshly received Model 01 and I’m just wondering: is it even possible to assign the acute and diaeresis diacritics modifying only the firmware?
Unlike backtick they don’t seem to have a keycode https://github.com/keyboardio/Kaleidoscope/blob/master/src/key_defs_keyboard.h. It doesn’t appear to be an oversight as I don’t think it is even part of HID Keyboard scan codes of the USB spec. Does that mean I have to rely on OS facilities to type the right character? or is there an alternative relying only on the firmware?
I’m using a QWERTY-based layout (US International, sort of).
Not exactly - currently on my layout I have ` (backtick) as a dead key. It means that when I type it once, nothing appears, but the next letter will have a grave accent.
` e = è
` i = ì
and so on.
It is relatively easy to set up this way: there is a key and a keycode for `, and by default the US international keyboard makes it behave as a dead key (as explained above). I’d like to have another key for ´ (acute accent) but there doesn’t seem to exist a keycode for it. I’m wondering if there is a dedicated keycode I missed, or a different keycode that “standard” layouts such as US International would interpret as “dead-key acute”.
In the absence of that, does it mean I have to fully rely on the operating system tools and create a keymap to install on the OS/or other solutions such as xmodmap?
At the end of it, yes. But you can make things a little easier: if you set up a Compose key (if you use GNOME, gnome-tweak-tool can help with this; if you’re not, I have no clue), that allows you to type à with AltGr Backtick a, and á with AltGr ' a, and so on. Then you can create a few macros that type these for you.
My Kaleidoscope-LangPack-Hungarian plugin may be of interest to you, which does something very similar. It uses custom keycodes instead of macros, but the underlying idea is the same.
FWIW, these keycodes are all on the firmware side, they do not end up in the HID report. The plugin translates them. You could use unused codes from the HID spec, and use xmodmap or similar to turn them into your desired symbols… but that sounds more work to me.
(Mind you, I’m biased, as I have a lot more experience with firmware, and 0 with xmodmap & friends. Never properly learned how to use them :p)
The names of the HID keyboard scan codes as found in header files such as key_defs_keyboard.h are slightly confusing. They are named according to what they would produce in your OS if your OS was configured to use US-QWERTY. But what the HID scan codes mean is more along the lines of “the physical key that is found on the second row, third from the left on an IBM AT keyboard”. But that’s not very human-friendly, and since most people have a QWERTY keyboard in full view when they program, it makes sense to name the physical keys according to what is printed on them.
If you want a dead-diaeresis, under normal circumstances you would tell your OS to use a mapping that includes dead-diaeresis as one of the outputs. This could be a keymap (such as US-international+dead_keys), an input method (such as compose key), or some other method that requires synchronisation between the keyboard firmware and a novel OS driver.