On Windows, currently EDuke32 and Mapster32 will force the keyboard layout to American English on startup. Recently I added support for toggling it back and forth whenever the Mapster32 window loses focus, but this has the side effect of introducing a stutter on regaining focus, and after reading Microsoft's documentation it will never work on Windows 8 and up.
I believe that interfering with the user's input setup is unnecessarily invasive, so I would like to remove this entirely. Fortunately, SDL2 gives us access to both scancodes, the physical position of keys on the keyboard irrespective of what character is assigned to them, and keycodes, the character that each key is labeled with.
I would like some input regarding in what situations it is better to use the labels on the keys and when it better to use the positions on the keyboard. For example, when entering cheats in Duke, you would probably want to type however you normally do on your keyboard, where the character on the key is what you get. But it might be different when dealing with Mapster's many key combinations. The latter is what the layout switching assumes, but I don't want to repeat a mistake similar to changing the 2D mode sprite colors based on my own preconceptions instead of mapper experience.
![](https://forums.duke4.net/public/style_images/cgs/_custom/switch.png)