2 ms·
> This is basically impossible, because the key matrix -> letter translation can be done in multiple places (in the keyboard firmware, in the OS, etc.). Hilario
by zokier 3y ago
> This is basically impossible, because the key matrix -> letter translation can be done in multiple places (in the keyboard firmware, in the OS, etc.). Hilariously, sometimes your keyboard firmware has to be aware of the OS translation; you cannot send a & keypress event over USB, so you have to send "shift + 7" if you want a key that generates that input
As someone who just is getting into custom keyboards, this is one really ugly wart in the whole stack. imho ideally keyboard would just send individual scancodes and the host would manage all the key layout stuff. But making fully custom layouts complete with custom modifiers is afaik pretty much impossible with Windows/Mac/mobiles, and even on Linux its bit of a pain. So it ends up easier for keyboard to pretend to be a standard keyboard and have macros to send complex scancode sequences and then just have standard US qwerty layout on host side. Which kinda works until you want to input stuff that is not on the standard US layout at which point you need some different layout on the host, and then you need to remap the keyboard so that it is in sync with the layout. And then you need to sync these configurations across different computers and operating systems.
Sometimes standardization is great, but sometimes it hides all sorts of pitfalls that you'll stumble upon once you actually want to step outside the standard solutions.