Keyboard layout

Hey everyone,

Does SDL have an option to support keyboard layouts other than QWERTY? I use the dvorak keyboard layout in Windows and Linux, but my SDL app only seems to notice it in Linux, but not Windows. I assume this has something to do with the way X11 handles keyboard layouts vs. whatever Windows does. This is a pretty obscure problem, so it’s no big deal if SDL doesn’t handle it.

–Ryan Phillips

I’m not entirely sure that recognizing dvorak (or any other bindings)
would always be the best solution, sometimes keys (like WASD) are chosen
for their proximity to one another, where on a dvorak they span the
keyboard. I have Windows XP which has the nice feature of allowing me
to switch dvorak/qwerty via the taskbar, and in games I always need to
make sure I’m in QWERTY. Of course if users are typing their name it’s
a different story, but I’m not sure how you’d deal with that as well as
keys as buttons.

    -James Turk

Hey everyone,

Does SDL have an option to support keyboard layouts other than QWERTY? I use the dvorak keyboard layout in Windows and Linux, but my SDL app only seems to notice it in Linux, but not Windows. I assume this has something to do with the way X11 handles keyboard layouts vs. whatever Windows does. This is a pretty obscure problem, so it’s no big deal if SDL doesn’t handle it.

–Ryan Phillips

Mainly I would prefer to have recognizing keyboard layout as an option
when initializing SDL, or a toggle function as much like Unicode support
is handled. Depending on what is being entered, (text vs. game keys), it
would be useful to be able to switch back and forth.

The inconsistency of having dvorak when I test in Linux vs. qwerty in
Windows is what really bothers me. But since I’m probably the only person
in the world affected by this, I’m not terribly concerned.On Thu, 02 Oct 2003, James Turk wrote:

I’m not entirely sure that recognizing dvorak (or any other bindings)
would always be the best solution, sometimes keys (like WASD) are chosen
for their proximity to one another, where on a dvorak they span the
keyboard. I have Windows XP which has the nice feature of allowing me
to switch dvorak/qwerty via the taskbar, and in games I always need to
make sure I’m in QWERTY. Of course if users are typing their name it’s
a different story, but I’m not sure how you’d deal with that as well as
keys as buttons.

    -James Turk