Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH

John Popplewell wrote:

What is an SDLK_ code supposed to be representing?

Currently, it seems to be the key-label of the equivalent physical key
location on a US keyboard, with a few extra keys thrown in for
international keyboards.

Unfortunately not. That’s what it is with the DirectX backend, but not
with most other backends I’ve tried. See
http://thread.gmane.org/gmane.comp.lib.sdl/24697.

-Christian

Christian,

Thanks for that, I’ve made a note of it here:
https://bugzilla.libsdl.org/show_bug.cgi?id=164

I’d vote for 1 also.

I’m working on a patch for windib that loads the US keyboard layout
whatever the system settings, and uses that to make consistent SDLK_
codes.

Is this the kind of ‘trick’ you were thinking of for X11? Or is it more
along the lines of having look-up tables for the raw keyboard scancodes?

John.On Wed, Mar 15, 2006 at 09:47:51AM +0100, Christian Walther wrote:

John Popplewell wrote:

What is an SDLK_ code supposed to be representing?

Currently, it seems to be the key-label of the equivalent physical key
location on a US keyboard, with a few extra keys thrown in for
international keyboards.

Unfortunately not. That’s what it is with the DirectX backend, but not
with most other backends I’ve tried. See
http://thread.gmane.org/gmane.comp.lib.sdl/24697.

John Popplewell wrote:

I’d vote for 1 also.

Nice to hear :slight_smile:

I’m working on a patch for windib that loads the US keyboard layout
whatever the system settings, and uses that to make consistent SDLK_
codes.

Is this the kind of ‘trick’ you were thinking of for X11? Or is it more
along the lines of having look-up tables for the raw keyboard scancodes?

Yes, it involves look-up tables. But I’m no X11 expert (so I don’t know
if a solution similar to yours would be possible), and since a) initial
feedback to my idea didn’t seem very positive and b) Sam has announced
that the keyboard handling will be revamped for 1.3, I haven’t even
started doodling around to see whether it could work.

Maybe I should, so that I have something to show before the 1.3 API gets
finalized.

Thanks anyway for showing that it can be done on the one backend among
the most important four (Quartz, X11, windx, windib) of which I have no
idea.

-Christian