src/video/win32/SDL_win32keyboard.c
changeset 2724 0e2b65f32298
parent 2324 3202e4826c57
child 2726 f23ebf1ddac4
equal deleted inserted replaced
2723:911db724ea24 2724:0e2b65f32298
    52     SDL_Keyboard keyboard;
    52     SDL_Keyboard keyboard;
    53     int i;
    53     int i;
    54 
    54 
    55     /* Make sure the alpha scancodes are correct.  T isn't usually remapped */
    55     /* Make sure the alpha scancodes are correct.  T isn't usually remapped */
    56     if (MapVirtualKey('T', MAPVK_VK_TO_VSC) != alpha_scancodes['T' - 'A']) {
    56     if (MapVirtualKey('T', MAPVK_VK_TO_VSC) != alpha_scancodes['T' - 'A']) {
    57         printf
    57 #if 0
    58             ("Fixing alpha scancode map, assuming US QWERTY layout!\nPlease send the following 26 lines of output to the SDL mailing list <sdl@libsdl.org>, including a description of your keyboard hardware.\n");
    58         printf("Fixing alpha scancode map, assuming US QWERTY layout!\nPlease send the following 26 lines of output to the SDL mailing list <sdl@libsdl.org>, including a description of your keyboard hardware.\n");
       
    59 #endif
    59         for (i = 0; i < SDL_arraysize(alpha_scancodes); ++i) {
    60         for (i = 0; i < SDL_arraysize(alpha_scancodes); ++i) {
    60             alpha_scancodes[i] = MapVirtualKey('A' + i, MAPVK_VK_TO_VSC);
    61             alpha_scancodes[i] = MapVirtualKey('A' + i, MAPVK_VK_TO_VSC);
       
    62 #if 0
    61             printf("%d = %d\n", i, alpha_scancodes[i]);
    63             printf("%d = %d\n", i, alpha_scancodes[i]);
       
    64 #endif
    62         }
    65         }
    63     }
    66     }
    64     if (MapVirtualKey(VK_NUMPAD0, MAPVK_VK_TO_VSC) != keypad_scancodes[0]) {
    67     if (MapVirtualKey(VK_NUMPAD0, MAPVK_VK_TO_VSC) != keypad_scancodes[0]) {
    65         printf
    68 #if 0
    66             ("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");
    69         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");
       
    70 #endif
    67         for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) {
    71         for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) {
    68             keypad_scancodes[i] =
    72             keypad_scancodes[i] =
    69                 MapVirtualKey(VK_NUMPAD0 + i, MAPVK_VK_TO_VSC);
    73                 MapVirtualKey(VK_NUMPAD0 + i, MAPVK_VK_TO_VSC);
       
    74 #if 0
    70             printf("%d = %d\n", i, keypad_scancodes[i]);
    75             printf("%d = %d\n", i, keypad_scancodes[i]);
       
    76 #endif
    71         }
    77         }
    72     }
    78     }
    73 
    79 
    74     data->key_layout = win32_scancode_table;
    80     data->key_layout = win32_scancode_table;
    75 
    81