sdl-fakeqwerty

Fixes non-QWERTY keyboards on Prison Architect (and maybe other SDL games) on Linux

OTHER License

Stars
9

sdl-fakeqwerty

sdl-fakeqwerty makes your keyboard act like a US-QWERTY keyboard, while not changing any system settings. This is ideal for games with difficult or impossible to change keybindings which get messed up when using a non-US-QWERTY keyboard.

This library intercepts SDL's or Xlib's event system in order to rewrite the keysym to be what a US-QWERTY keyboard would return. When activated on a non-QWERTY keyboard, the game will have keyboard shortcuts with the same physical positions as a QWERTY keyboard. For example:

This means you no longer have to change your keyboard layout to play a single game, and the remapping is isolated to a single application (window) and automated.

I've mainly tested this with some Introversion games. It might fix some other games as well -- it has been tested with Allegro, SDL 1.2, SDL 2.0 and Unity.

Key labels shown in-game will probably be displayed incorrectly as a result of using this library (they will be the same as a US-QWERTY keyboard).

Note: This will only work on Linux systems, as it relies on LD_PRELOAD to work. There is limited support on macOS (Prison Architect).

I'm not interested in porting this code to other platforms (eg: Windows), but patches are welcome if you can make it work. ;)

Documentation