There are APIs to translate scan codes between QWERTY and whatever the system layout is set to. This means you can keep the physical layout of keybindings the same and just display a different name to the user. E.g. https://wiki.libsdl.org/CategoryKeyboard
Non-QWERTY users would never have to change their key bindings to match their layout, layouts would no longer break when switching between systems. These issues are particularly annoying with a lot of mods.
Read keyboard layout from system
Moderator: ickputzdirwech
Re: Read keyboard layout from system
This is quite interesting, but I fear, this is not possible, cause they use Allegro for that.
https://www.allegro.cc/manual/5/keyboard.html
https://www.allegro.cc/manual/5/keyboard.html
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Read keyboard layout from system
I could be wrong, but it seems they could use this SDL lib just for translating the scan codes even if they don't use it for the actual input handling. The scan codes come from the hardware so they'll be the same in either case.
Alternatively, since SDL is under zlib license, they can copy whatever bits would help get the job done
Alternatively, since SDL is under zlib license, they can copy whatever bits would help get the job done
Re: Read keyboard layout from system
I'm sure its possible one way or another.
Personally, I gave up translating the keyboard bindings to be usable on my keyboard, and just created a Factorio mapping for my G13 using the existing Factorio bindings. But if you don't have a dedicated gaming keyboard and don't like QWERTY, this doesn't help you much.
Personally, I gave up translating the keyboard bindings to be usable on my keyboard, and just created a Factorio mapping for my G13 using the existing Factorio bindings. But if you don't have a dedicated gaming keyboard and don't like QWERTY, this doesn't help you much.
Re: Read keyboard layout from system
Switched to SDL and scancodes in 0.17 https://www.factorio.com/blog/post/fff-259