Possible improvements over standard keyboards
- Ray
- Location: Germany
- Main mouse: touchpad
- DT Pro Member: -
With unicode on firmware level you are shifting an indirection from the software to the firmware side which shadows the hardware-level of the keypresses. This is okay for the usecase where the keyboard is used for entering text. But that isn't the only context a keyboard is used in.trapicki wrote: ↑Currently, the keyboard sends a scan code, that is translated to some meaning by the keyboard driver and keyboard layout mapping. Quite a few indirections. If you decide for example to separate [ ans { on an US keyboard, you have to send "[" for the first and "Shift-[" for the second.
Let's look at another one that is currently appealing to a fair share of people that are willing to pay more than the minimun on keyboards: games. Here the keyboard acts as a gamepad with several dozens of buttons. If you assign 'A' to left, and 'Fn' to jump, but your keyboard sends for Fn+A the unicode for 'Aleph', game developers will curse a lot. If you don't send a equivalent for scancodes, there is no way to know which buttons were pressed to get that Aleph.
Or as another case, maybe a program wants to distinguish between the numpad '3' and the '3' on top of the alphas. Maybe insert roman numbers when numpad numbers are pressed. Anyways the application knows the context, the keyboard never does!
The application can't interprete the keypresses in its context, if the keyboard tries to interprete what was meant by 'Fn+A' when it had no idea what was meant by it.
- trapicki
- Main keyboard: Microsoft Natural Ergonomic 4000/Cherry G83 unlabl
- Main mouse: Logitech G500
- Favorite switch: Lets see, waiting for order
- DT Pro Member: -
There is quite a range of posibilites:Ray wrote: ↑Anyways the application knows the context, the keyboard never does!
- The keyboard sends just a key number, the software (OS, programs) interprets what that means.
- The keyboard sends some code with some meaning, the software interprets this, with some default values, and some "translations". This is the currently used system, the translations are the keyboard mapping files. Manufacturers simple change the labeling, but not the scan codes for different languages. Moreover, some state is held and reported back to the keyboard, for example "Num Lock", which changes details in the interpretation.
- The keyboard sends some code, the software interprets this, but no different mapping exist for the same scan codes.
- The keyboard sends some code, the software asks the keyboard some time for the meaning of the code.
For games, mapping is arbitrary anyway. Any program that nails down shortcuts and key mappings will break for some layout anyway.
So why not just get it clean: The keyboard sends some meaningful code, the software does not do some obscure magic, and we have a lot less problems.
-
- Location: CZ
- Main keyboard: Kinesis Advantage2, JIS ThinkPad,…
- Main mouse: I like (some) trackballs, e.g., L-Trac
- Favorite switch: #vintage ghost Cherry MX Black (+ thick POM caps)
- DT Pro Member: -
Either your keyboard, or your OS sucks.trapicki wrote: ↑…and ] is AltGr-0. That in turn is sent as Ctrl-Alt-0, which makes it impossible in German layouts to press Ctrl-].
AltGr-0 means
- key code 100 press;
- key code 11 press;
- key code 11 release;
- key code 100 release.
- Ray
- Location: Germany
- Main mouse: touchpad
- DT Pro Member: -
what's hacky about AltGr? It's a mod, just like shift. Shift+5 results in %, AltGr+7 in {. No macros or other wizardry involved.
It is stupid a new mod got introduced for ~9 Symbols though. And it is rediculously stupidly placed for a mod. Don't get me wrong, I like thumbkeys, but this is usually too far right. And the keys it modifies are pressed with fingers on the same hand… come on, that's like saying left shift is for keys left of G and right shift for the keys right of H!
It is stupid a new mod got introduced for ~9 Symbols though. And it is rediculously stupidly placed for a mod. Don't get me wrong, I like thumbkeys, but this is usually too far right. And the keys it modifies are pressed with fingers on the same hand… come on, that's like saying left shift is for keys left of G and right shift for the keys right of H!
- OleVoip
- Location: Hamburg
- Main keyboard: Tandberg TDV-5010
- Main mouse: Wacom Pen & Touch
- Favorite switch: Siemens STB 21
- DT Pro Member: -
On a German keyboard, press Ctrl along with the key where "]" is on a US keyboard (which is the German "+" key) and you get Ctrl-]. That's because Ctrl-] is not just the physical combination of two keypresses but it translates to a 7-bit ascii code.trapicki wrote: ↑in German, / is Shift-7, and ] is AltGr-0. That in turn is sent as Ctrl-Alt-0, which makes it impossible in German layouts to press Ctrl-]. I once had a program that had this shortcut for a quite important function. No way to do this with German layout, besides being an awkward combination at the German layout.