peterix/dfhack — Issue #135: Keybindings doesn't respect Input Language (alt. keyboard layouts) on Windows
Author: ClaytonHughes
Created: 2012-03-09 02:52:49+00:00
State: open

dfhack keybindings doesn't use the Input Language set in Windows when reading the keyboard, and just assumes QWERTY.

This means that alternate keyboard layouts (QWERTZ, AZERTY, Dvorak) don't bind keys correctly.

To repro (this was tested on a US-English install of Win7):

1. Set an alternate Input Language: Start > intl.cpl > keyboards and languages tab > change keyboards > add > check English (United States)/Keyboard/United States-Dvorak. Change the "Default Input Language" to English (United States) - United States-Dvorak > OK
2. start dfhack/df. Load a world in dfhack and navigate to a body of water/magma
3. [DFHack]# keybinding add Ctrl-T "twaterlvl"
4. Press Ctrl-T (note that Dvorak's T is where the K key is in QWERTY). Nothing happens.
5. Press Ctrl-Y (note that Dvorak's Y is where the T key is in QWERTY). Water is toggled to/from numbers.

I also tested this in Ubuntu x64 11.10, and the problem didn't appear there, so it seems it's specific to handling keyboard events on Windows.