Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH

Ive found a big difference between the CVS code and the latest release on
the website. The tilde key ( the key to the left of the 1 key) which in my
game is used for brining up a console (like many other games) has for some
reason changed its sym from SDLK_BACKQUOTE to SDLK_BACKSPACE and I now
wonder if this is a bug or if its meant to be like this.

// Tomaz

Ive found a big difference between the CVS code and the latest release on
the website. The tilde key ( the key to the left of the 1 key) which in my
game is used for brining up a console (like many other games) has for some
reason changed its sym from SDLK_BACKQUOTE to SDLK_BACKSPACE and I now
wonder if this is a bug or if its meant to be like this.

What platform are you running on?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Im using Win32 and MSVC 2003.
I tried to just compile the CVS code and throw in the dll with my old
application and it didnt work. Then I also copied all the new headers and
the new compiled .lib and rebuild the application. Still didnt work. So i
debugged it and the keysym says its scancode 41 (as it should be) but it has
changed the sym to SDLK_BACKSLASH.

// Tomaz

----Original Message Follows----From: slouken@libsdl.org (slouken)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Mon, 13 Mar 2006 16:36:35 -0800

Ive found a big difference between the CVS code and the latest release on
the website. The tilde key ( the key to the left of the 1 key) which in
my
game is used for brining up a console (like many other games) has for
some
reason changed its sym from SDLK_BACKQUOTE to SDLK_BACKSPACE and I now
wonder if this is a bug or if its meant to be like this.

What platform are you running on?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Im using Win32 and MSVC 2003.
I tried to just compile the CVS code and throw in the dll with my old
application and it didnt work. Then I also copied all the new headers and
the new compiled .lib and rebuild the application. Still didnt work. So i
debugged it and the keysym says its scancode 41 (as it should be) but it has
changed the sym to SDLK_BACKSLASH.

VK_BACKSLASH is 0xDC … ?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

I guess… Its defined by SDL so. But i just checked the current CVS and the
1.2.9 source zip from the website. And I cant really find any important
differencies. I wonder if the fact that i have to open up the MSVC 6 project
breaks something. (The sln was made with MSVC 2005 it seems)

// Tomaz

----Original Message Follows----From: slouken@libsdl.org (slouken)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Mon, 13 Mar 2006 16:54:56 -0800

Im using Win32 and MSVC 2003.
I tried to just compile the CVS code and throw in the dll with my old
application and it didnt work. Then I also copied all the new headers and
the new compiled .lib and rebuild the application. Still didnt work. So i
debugged it and the keysym says its scancode 41 (as it should be) but it
has
changed the sym to SDLK_BACKSLASH.

VK_BACKSLASH is 0xDC … ?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I guess… Its defined by SDL so. But i just checked the current CVS and the
1.2.9 source zip from the website. And I cant really find any important
differencies. I wonder if the fact that i have to open up the MSVC 6 project
breaks something. (The sln was made with MSVC 2005 it seems)

I can’t think of anything… I just double-checked and this works fine here.
Did you change your keyboard layout recently?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

No. I can keep changing between the newly built 1.2.10 and the 1.2.9 from
the website. And the 1.2.9 on the website works as expected.

I’ll spend some time with grabbing the source from different dates on the
CVS to try to figure out when the bug was introduced and then run a diff on
the code.

Ill report back if I find anything.

// Tomaz

----Original Message Follows----From: slouken@libsdl.org (slouken)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Mon, 13 Mar 2006 17:20:17 -0800

I guess… Its defined by SDL so. But i just checked the current CVS and
the
1.2.9 source zip from the website. And I cant really find any important
differencies. I wonder if the fact that i have to open up the MSVC 6
project
breaks something. (The sln was made with MSVC 2005 it seems)

I can’t think of anything… I just double-checked and this works fine here.
Did you change your keyboard layout recently?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I’ll spend some time with grabbing the source from different dates on the
CVS to try to figure out when the bug was introduced and then run a diff on
the code.

Thanks!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Ok. After some detective work i have found out that the bug was introduced
between 2006-01-02 and 2006-01-03.
After making a diff on that code the only thing I can find seems to be some
changes to Atari code?

SDL_AtariToUnicode

Ill try some more stuff to try to narrow it down even more.

// Tomaz

----Original Message Follows----From: slouken@libsdl.org (slouken)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Mon, 13 Mar 2006 17:41:03 -0800

I’ll spend some time with grabbing the source from different dates on the
CVS to try to figure out when the bug was introduced and then run a diff
on
the code.

Thanks!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I have now found out what causes the bug, eventho i have no clue why it does
it.

Between 2006-0102 00:00 and 2006-01-02 03:00 these two switched place.

#ifdef ENABLE_DIRECTX
&DIRECTX_bootstrap,
#endif
#ifdef ENABLE_WINDIB
&WINDIB_bootstrap,
#endif

When putting them back to have DIRECTX before WINDIB the key works just
fine.

Ive tested this on the current CVS and it works there as well if these 2
switches back to the wau they used to be before 2006-01-02 03:00.

The question is why they were switched in the first place?

// Tomaz

----Original Message Follows----From: @Tomas_Jakobsson (Tomas Jakobsson)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: sdl at libsdl.org
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Tue, 14 Mar 2006 02:54:54 +0100

Ok. After some detective work i have found out that the bug was introduced
between 2006-01-02 and 2006-01-03.
After making a diff on that code the only thing I can find seems to be some
changes to Atari code?

SDL_AtariToUnicode

Ill try some more stuff to try to narrow it down even more.

// Tomaz

----Original Message Follows----
From: slouken@libsdl.org (slouken)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Mon, 13 Mar 2006 17:41:03 -0800

I’ll spend some time with grabbing the source from different dates on
the
CVS to try to figure out when the bug was introduced and then run a diff
on
the code.

Thanks!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I have now found out what causes the bug, eventho i have no clue why it
does
it.

Between 2006-0102 00:00 and 2006-01-02 03:00 these two switched place.

#ifdef ENABLE_DIRECTX
&DIRECTX_bootstrap,
#endif
#ifdef ENABLE_WINDIB
&WINDIB_bootstrap,
#endif

When putting them back to have DIRECTX before WINDIB the key works just
fine.

Ive tested this on the current CVS and it works there as well if these 2
switches back to the wau they used to be before 2006-01-02 03:00.

The question is why they were switched in the first place?

// Tomaz

They were switched in a test to see if it resolved issues of DirectX not
grabbing keyboard events on more modern Windows systems (win2003, x64,
etc…) as I recall. It had/hasn’t been decided weither it will be a final
change, but perhaps this bug has just existed longer in the windib code and
gone unnoticed?

#ifdef ENABLE_DIRECTX
&DIRECTX_bootstrap,
#endif
#ifdef ENABLE_WINDIB
&WINDIB_bootstrap,
#endif

When putting them back to have DIRECTX before WINDIB the key works just
fine.

Interesting, it sounds like the WINDIB driver has been broken for a long
time. What’s wierd is that it’s working fine for me. What language do
you use? What keyboard layout do you use? Do you have any other keyboard
programs that behave funny?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Im not sure what you mean by language so I better give to much info than
needed.
I code using C as language. I use a swedish keyboard language with the
regualt qwerty layout.

Im running WinXP SP2 and compile using MSVC 2003 .Net Enterprise with Summer
2004 DirectX SDK.

No other programs have ever behaved funny regarding keyboard input.

// Tomaz

----Original Message Follows----From: slouken@libsdl.org (slouken)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Mon, 13 Mar 2006 18:44:36 -0800

#ifdef ENABLE_DIRECTX
&DIRECTX_bootstrap,
#endif
#ifdef ENABLE_WINDIB
&WINDIB_bootstrap,
#endif

When putting them back to have DIRECTX before WINDIB the key works just
fine.

Interesting, it sounds like the WINDIB driver has been broken for a long
time. What’s wierd is that it’s working fine for me. What language do
you use? What keyboard layout do you use? Do you have any other keyboard
programs that behave funny?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi Tomaz,

Does your keyboard look like this:
http://content.answers.com/main/content/wp/en/c/cf/Keyboard_Layout_Swedish.png

(using Google Images)

I’ve got UK and US keyboards and a German keyboard made from a UK one
using sticky labels!

I can confirm this using the checkkeys.c test application from the SDL
source distribution.

I’m on WinXP SP2 also, but compiled using MSYS/MinGW. I set the Input
Language to Swedish (not Swedish(Finland)) and Keyboard Layout/IME to
Swedish (not Swedish with Sami).

It works OK with DirectX drivers:

Key pressed: 97-a (a) modifiers: NUM
Key released: 97-a modifiers: NUM
Key pressed: 98-b (b) modifiers: NUM
Key released: 98-b modifiers: NUM
Key pressed: 99-c © modifiers: NUM
Key released: 99-c modifiers: NUM
Key pressed: 96-(??) modifiers: NUM Key released: 96- modifiers: NUM
Key pressed: 303-right shift modifiers: RSHIFT NUM
Key pressed: 96-(??) modifiers: RSHIFT NUM Key released: 96- modifiers: RSHIFT NUM
Key released: 303-right shift modifiers: NUM

but with windib:

Key pressed: 97-a (a) modifiers: NUM
Key released: 97-a modifiers: NUM
Key pressed: 98-b (b) modifiers: NUM
Key released: 98-b modifiers: NUM
Key pressed: 99-c © modifiers: NUM
Key released: 99-c modifiers: NUM
Key pressed: 92-\ (??) modifiers: NUM
Key released: 92-\ modifiers: NUM
Key pressed: 303-right shift modifiers: RSHIFT NUM
Key pressed: 92-\ (??) modifiers: RSHIFT NUM
Key released: 92-\ modifiers: RSHIFT NUM
Key released: 303-right shift modifiers: NUM

the translated character is the same, but the scancode is different -
most bizzare!

cheers,
John.On Tue, Mar 14, 2006 at 01:51:03PM +0100, Tomas Jakobsson wrote:

Im not sure what you mean by language so I better give to much info than
needed.
I code using C as language. I use a swedish keyboard language with the
regualt qwerty layout.

Im running WinXP SP2 and compile using MSVC 2003 .Net Enterprise with Summer
2004 DirectX SDK.

No other programs have ever behaved funny regarding keyboard input.

Yes thats what my keyboard looks like. And the key im refearing to as
"broken" is the one to the left of the 1 key. The key with ? and ? on it.

// Tomaz

----Original Message Follows----From: john@johnnypops.demon.co.uk (John Popplewell)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Tue, 14 Mar 2006 13:48:14 +0000

On Tue, Mar 14, 2006 at 01:51:03PM +0100, Tomas Jakobsson wrote:

Im not sure what you mean by language so I better give to much info than
needed.
I code using C as language. I use a swedish keyboard language with the
regualt qwerty layout.

Im running WinXP SP2 and compile using MSVC 2003 .Net Enterprise with
Summer
2004 DirectX SDK.

No other programs have ever behaved funny regarding keyboard input.

Hi Tomaz,

Does your keyboard look like this:
http://content.answers.com/main/content/wp/en/c/cf/Keyboard_Layout_Swedish.png

(using Google Images)

I’ve got UK and US keyboards and a German keyboard made from a UK one
using sticky labels!

I can confirm this using the checkkeys.c test application from the SDL
source distribution.

I’m on WinXP SP2 also, but compiled using MSYS/MinGW. I set the Input
Language to Swedish (not Swedish(Finland)) and Keyboard Layout/IME to
Swedish (not Swedish with Sami).

It works OK with DirectX drivers:

Key pressed: 97-a (a) modifiers: NUM
Key released: 97-a modifiers: NUM
Key pressed: 98-b (b) modifiers: NUM
Key released: 98-b modifiers: NUM
Key pressed: 99-c © modifiers: NUM
Key released: 99-c modifiers: NUM
Key pressed: 96-(??) modifiers: NUM Key released: 96- modifiers: NUM
Key pressed: 303-right shift modifiers: RSHIFT NUM
Key pressed: 96-(??) modifiers: RSHIFT NUM Key released: 96- modifiers: RSHIFT NUM
Key released: 303-right shift modifiers: NUM

but with windib:

Key pressed: 97-a (a) modifiers: NUM
Key released: 97-a modifiers: NUM
Key pressed: 98-b (b) modifiers: NUM
Key released: 98-b modifiers: NUM
Key pressed: 99-c © modifiers: NUM
Key released: 99-c modifiers: NUM
Key pressed: 92-\ (??) modifiers: NUM
Key released: 92-\ modifiers: NUM
Key pressed: 303-right shift modifiers: RSHIFT NUM
Key pressed: 92-\ (??) modifiers: RSHIFT NUM
Key released: 92-\ modifiers: RSHIFT NUM
Key released: 303-right shift modifiers: NUM

the translated character is the same, but the scancode is different -
most bizzare!

cheers,
John.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Yes thats what my keyboard looks like. And the key im refearing to as
"broken" is the one to the left of the 1 key. The key with ? and ? on it.

OK, thanks.

Here’s what I’ve found out so far:

Independent of keyboard mapping (as expected). The scancode for this
key is 0x29 and for the > and < key on your keyboard, (| and \ on my UK
one) is 0x56.

BUT, the windows VK_ code for these keys changes depending on the
keyboard mapping. I’m getting:

Scancode 0x29:
Swedish: VK code 0xDC <—
UK: VK code 0xDF
Scancode 0x56:
Swedish: VK code 0xE2
UK: VK code 0xDC <—

which breaks the assumption that the VK_ code can be used to map keys to
the the SDLK_ codes :frowning:

cheers,
John.On Tue, Mar 14, 2006 at 03:11:43PM +0100, Tomas Jakobsson wrote:

// Tomaz

----Original Message Follows----
From: John Popplewell <@John_Popplewell>
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Key namechange from SDLK_BACKQUOTE to SDLK_BACKSLASH
Date: Tue, 14 Mar 2006 13:48:14 +0000

On Tue, Mar 14, 2006 at 01:51:03PM +0100, Tomas Jakobsson wrote:

Im not sure what you mean by language so I better give to much info than
needed.
I code using C as language. I use a swedish keyboard language with the
regualt qwerty layout.

Im running WinXP SP2 and compile using MSVC 2003 .Net Enterprise with
Summer
2004 DirectX SDK.

No other programs have ever behaved funny regarding keyboard input.

Hi Tomaz,

Does your keyboard look like this:
http://content.answers.com/main/content/wp/en/c/cf/Keyboard_Layout_Swedish.png

(using Google Images)

I’ve got UK and US keyboards and a German keyboard made from a UK one
using sticky labels!

I can confirm this using the checkkeys.c test application from the SDL
source distribution.

I’m on WinXP SP2 also, but compiled using MSYS/MinGW. I set the Input
Language to Swedish (not Swedish(Finland)) and Keyboard Layout/IME to
Swedish (not Swedish with Sami).

It works OK with DirectX drivers:

Key pressed: 97-a (a) modifiers: NUM
Key released: 97-a modifiers: NUM
Key pressed: 98-b (b) modifiers: NUM
Key released: 98-b modifiers: NUM
Key pressed: 99-c © modifiers: NUM
Key released: 99-c modifiers: NUM
Key pressed: 96-(??) modifiers: NUM Key released: 96- modifiers: NUM
Key pressed: 303-right shift modifiers: RSHIFT NUM
Key pressed: 96-(??) modifiers: RSHIFT NUM Key released: 96- modifiers: RSHIFT NUM
Key released: 303-right shift modifiers: NUM

but with windib:

Key pressed: 97-a (a) modifiers: NUM
Key released: 97-a modifiers: NUM
Key pressed: 98-b (b) modifiers: NUM
Key released: 98-b modifiers: NUM
Key pressed: 99-c © modifiers: NUM
Key released: 99-c modifiers: NUM
Key pressed: 92-\ (??) modifiers: NUM
Key released: 92-\ modifiers: NUM
Key pressed: 303-right shift modifiers: RSHIFT NUM
Key pressed: 92-\ (??) modifiers: RSHIFT NUM
Key released: 92-\ modifiers: RSHIFT NUM
Key released: 303-right shift modifiers: NUM

the translated character is the same, but the scancode is different -
most bizzare!

cheers,
John.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hello !

which breaks the assumption that the VK_ code can be used to map keys to
the the SDLK_ codes :frowning:

Is there a way on Windows doing it ?

CU

Hello !

which breaks the assumption that the VK_ code can be used to map keys to
the the SDLK_ codes :frowning:

What about other OSes like Linux and Mac OS (X) ?
Do these problems exist there too ?

CU

I guess it’s possible.

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.

This works as far as it goes, it’s just that on Windows, with the windib
driver, this info isn’t easily available.

I’ll look into it. It might be possible to use MapVirtualKeyEx() with a
US keyboard layout handle from LoadKeyboardLayout() to convert a
scancode into a VK_ code in a language independent way,

cheers,
John.On Tue, Mar 14, 2006 at 05:06:03PM +0100, Torsten Giebl wrote:

Hello !

which breaks the assumption that the VK_ code can be used to map keys to
the the SDLK_ codes :frowning:

What about other OSes like Linux and Mac OS (X) ?
Do these problems exist there too ?

I’ve generated a bug report for this:

https://bugzilla.libsdl.org/show_bug.cgi?id=164

cheers,
John.