4 ms·
The most frustrating part about the entire keyboard stack is how simple it looks at first glance. If I type `q'`, my keyboard will send scancodes 20 (Q), 52 ('
by crote 3y ago
The most frustrating part about the entire keyboard stack is how simple it looks at first glance.
If I type `q'`, my keyboard will send scancodes 20 (Q), 52 (' / "). This gets translated into symbols `q'`, which end up as characters `q'`. However, with a slightly different configuration I'll type `a'`, my keyboard will send scancodes 20 (Q), 52 (' / "), it gets translated into symbols `a'`, and they end up as the character `á`.
It sorta-kinda works, but when you are a keyboard you are basically at the mercy of the OS to interpret your intentions. Reliably inputting anything beyond basic ascii is incredibly difficult, and you get stuck trying to deal with dead keys, compose keys, numpad unicode input... Heck, even directly typing symbols like `&` is tricky because you essentially have to emulate <shift down><7 down><7 up><shift up>, which means that something like <& down><5 down><& up><5 up> will give you a surprise `%` instead of a plain `5`.
I'm into custom keyboards and I'd love to have a layer where I could just have a simple key to input stuff more complex than plain letters, but there's just no way to do so reliably.
- the_gipsy 3y agoI've been there with custom keyboards and unicode. Today, my keyboard has only 52 keys and only one layer for numbers and the number-symbols. The rest is done by the OS. This way I can use both the integrated laptop keyboard and the 52-key custom keyboard the same way.
- abdullahkhalids 3y agoThe OS is the right place to interpret incoming signals. On linux at least, you can create a custom keyboard with all the characters you want. And then bind your CAPSLOCK key to switch between your two keyboards.