[SDL] Some keys cancel each other with 1.2.10 (notthetypicalkeyboard bug)

Alex Volkov avcp-sdlmail at usa.net
Fri Jun 2 08:53:51 PDT 2006


James Haley wrote:

> It appears that modifiers + arrow keys are fixed under 1.2.10, as you
> say pressing shift now works, and for me, pressing alt now works.
> However, for the other keys, like alphanumerics, it is not fixed.

I am not so sure it is "fixed", but see below.

Martin Lange wrote:
> But then came SDL 1.2.10 and the problem disappeared. I have just
> (like in "now") tested it both with SDL 1.2.9 and 1.2.10 So I can't
> see it any other way, than this is a SDL-thing.

Could be the same "fixed" issue, but see below.

> So, the question is, what is the difference in how SDL is handling
> modifier keys from how it is handling other keys, and what between
> 1.2.9 and 1.2.10 was changed to make this difference?

The biggest difference is that SDL 1.2.10 ships with Windib driver being
default, while 1.2.9 had DirectX as default. Unfortunately, it appears that
Windib keyboard handling did not receive enough testing originally (probably
because everyone was using DirectX so far), so it still has some quirks in
1.2.10. A number of Windib keyboard things have been fixed in SVN since
1.2.10 release (see http://bugzilla.libsdl.org/show_bug.cgi?id=164).
The handling of keyboard events in Windib and DirectX drivers is very
different: DirectX uses scancodes only, and Windib uses Windows virtual
keys.

Note that on my Win2k system, both drivers in both SDL versions are working
fine with shift + arrow keys and J + arrow keys.

If you really want to test what got fixed and what got broken, you should
force the driver with SDL_VIDEODRIVER envvar:
C> set SDL_VIDEODRIVER=directx    (or windib)
C> my_app.exe

-Alex.






More information about the SDL mailing list