Scancodes over Keycodes for Keyboard Input

Started by toefur, June 19, 2018, 08:03:13 PM

Previous topic - Next topic

toefur

When polling keyboard input in games, it is often beneficial to use the Scancode (physical key) rather than the Keycode (keyboard layout output) to avoid having to remap the whole keyboard just to play.
While this game is nice enough to allow remapping, having so many different keyboard inputs makes it tedious to remap everything one by one to match the intended default for QWERTY users.
For those using QWERTZ or AZERTY, remapping a couple keys is usually all that is needed, but for users of Dvorak, Colmak, their derivatives or other obscure layouts, it can be a huge pain to remap keys.

Since switching to Scancodes has no negative effect on those using QWERTY and it is often a trivial change in source code, I feel it should be adopted for most PC games and I do so in all of the game engines I have worked on.

Klomster

Well, if it isn't difficult.
I'd say why not.

It makes no difference for me with a QWERTY. And i imagine remapping would be annoying.