BUG REPORT: windows/non-directx/keypad

The non-directx win32 target of SDL-1.2.1 incorrectly handles keys.

The keypad keys 2/4/6/8 return SDLK_{DOWN,LEFT,UP,RIGHT} and the
same scancodes as the arrow keys unless numlock is enabled. This
would indicate that some sort of cooked scancode is being read from
win32 instead of the raw scancode.

Also neither the directx or non-directx win32 targets appear to handle
capslock or numlock properly, returning consecutively down and up events
for each press and release instead of a down event on press and an up
event on release.

It is definitely possible to make this work as other win32 apps I have
(non-SDL) correctly handle these keys. A good example (with source)
would be Quake.

problem with TranslateKey in the SDL source[1], but it may be something
in the keyboard setup before this.

I expect there are implications here for non-qwerty keyboards, but I’m
not a windows programmer so this is as far as I can go with debugging.

  • Mike

[1] See TranslateKey() and DIB_HandleMessage in
src/video/windib/SDL_dibevents.cFrom my brief look this the keypad handling would seem to be a

[1] See TranslateKey() and DIB_HandleMessage in