sdl@lists.libsdl.org
[Top] [All Lists]

Re: [SDL] Trouble with arrow keys in Windows

Subject: Re: [SDL] Trouble with arrow keys in Windows
From: Sam Lantinga
Date: Sun, 1 Nov 2009 21:21:47 -0700
This is a known bug on the TODO list:
http://bugzilla.libsdl.org/show_bug.cgi?id=743

On Sun, Nov 1, 2009 at 4:22 PM, Terry Welsh <mogumbo@xxxxxxxxx> wrote:
> I'm using SDL 1.3 and have arrow keys working in Linux using
> SDL_SCANCODE_LEFT, SDL_SCANCODE_RIGHT, SDL_SCANCODE_UP, and
> SDL_SCANCODE_DOWN.  In Windows, these tokens print out as 79, 80, 81,
> and 82, which are the values in SDL_default_keymap in SDL_keyboard.c.
>
> But I can only make the arrow keys work in Windows by checking the
> SDL_GetKeyboardState() array elements with 90, 92, 94, and 96.  These
> values appear to map properly to the values in scancodes_xfree86.h and
> not to the left/right/up/down values in scancodes_win32.h.  Could I be
> compiling SDL incorrectly or something (I'm compiling with
> VisualStudio 2008 EE)?  I'm not sure where to look next for the
> problem....
> --
> Terry Welsh  /  mogumbo 'at' gmail.com
> www.reallyslick.com  /  www.mogumbo.com
> _______________________________________________
> SDL mailing list
> SDL@xxxxxxxxxxxxxxxx
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



-- 
        -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
_______________________________________________
SDL mailing list
SDL@xxxxxxxxxxxxxxxx
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

<Prev in Thread] Current Thread [Next in Thread>