src/video/win32/SDL_win32keyboard.c
changeset 2317 f537a293b3da
parent 2311 54e21acfec5a
child 2324 3202e4826c57
     1.1 --- a/src/video/win32/SDL_win32keyboard.c	Mon Feb 11 20:26:22 2008 +0000
     1.2 +++ b/src/video/win32/SDL_win32keyboard.c	Mon Feb 11 21:06:32 2008 +0000
     1.3 @@ -41,6 +41,9 @@
     1.4      30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24,
     1.5      25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44
     1.6  };
     1.7 +BYTE keypad_scancodes[10] = {
     1.8 +    82, 79, 80, 81, 75, 76, 77, 71, 72, 73
     1.9 +};
    1.10  
    1.11  void
    1.12  WIN_InitKeyboard(_THIS)
    1.13 @@ -57,6 +60,13 @@
    1.14  printf("%d = %d\n", i, alpha_scancodes[i]);
    1.15          }
    1.16      }
    1.17 +    if (MapVirtualKey(VK_NUMPAD0, MAPVK_VK_TO_VSC) != keypad_scancodes[0]) {
    1.18 +printf("Fixing keypad scancode map!\nPlease send the following 10 lines of output to the SDL mailing list <sdl@libsdl.org>, including a description of your keyboard hardware.\n");
    1.19 +        for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) {
    1.20 +            keypad_scancodes[i] = MapVirtualKey(VK_NUMPAD0+i, MAPVK_VK_TO_VSC);
    1.21 +printf("%d = %d\n", i, keypad_scancodes[i]);
    1.22 +        }
    1.23 +    }
    1.24  
    1.25      data->key_layout = win32_scancode_table;
    1.26