SDL
authorAlfred Reynolds <alfred@valvesoftware.com>
Wed, 24 Jun 2015 10:56:37 -0700
changeset 97777408fe91d07b
parent 9776 952ff8a5076f
child 9778 e7de5f41bb79
SDL
- do the scancode to keyboard code lookup for the grave key, so that we can show users the correct keyface for the key, rather than forcing it to "`". Note that if a game is using SDLK_* for its KB mapping then after this change on some keyboards the top left key will no longer be mapped correctly with the old data.

CR: SamL
src/video/windows/SDL_windowskeyboard.c
     1.1 --- a/src/video/windows/SDL_windowskeyboard.c	Mon Jun 22 23:36:06 2015 -0700
     1.2 +++ b/src/video/windows/SDL_windowskeyboard.c	Wed Jun 24 10:56:37 2015 -0700
     1.3 @@ -122,10 +122,9 @@
     1.4          }
     1.5  
     1.6          /* If this key is one of the non-mappable keys, ignore it */
     1.7 -        /* Don't allow the number keys right above the qwerty row to translate or the top left key (grave/backquote) */
     1.8          /* Not mapping numbers fixes the French layout, giving numeric keycodes for the number keys, which is the expected behavior */
     1.9          if ((keymap[scancode] & SDLK_SCANCODE_MASK) ||
    1.10 -            scancode == SDL_SCANCODE_GRAVE ||
    1.11 +			/*  scancode == SDL_SCANCODE_GRAVE || */ /* Uncomment this line to re-enable the behavior of not mapping the "`"(grave) key to the users actual keyboard layout */
    1.12              (scancode >= SDL_SCANCODE_1 && scancode <= SDL_SCANCODE_0) ) {
    1.13              continue;
    1.14          }