src/video/windows/SDL_windowskeyboard.c
changeset 6926 166712f45009
parent 6925 59fedfb8faaf
child 6938 b272d47f70a7
     1.1 --- a/src/video/windows/SDL_windowskeyboard.c	Mon Feb 25 16:52:51 2013 -0800
     1.2 +++ b/src/video/windows/SDL_windowskeyboard.c	Mon Feb 25 16:52:52 2013 -0800
     1.3 @@ -165,8 +165,12 @@
     1.4          }
     1.5  		/* Don't allow the number keys right above the qwerty row to translate or the top left key (grave/backquote) */
     1.6  		/* not mapping numbers fixes the AZERTY layout (french) causing non-shifted number to appear by default */
     1.7 -		if ( ( scancode >= SDL_SCANCODE_1 && scancode <= SDL_SCANCODE_0 ) || 
     1.8 -			  scancode == SDL_SCANCODE_GRAVE )  {
     1.9 +		if ( scancode == SDL_SCANCODE_GRAVE ) {
    1.10 +			keymap[scancode]  = SDLK_BACKQUOTE;
    1.11 +			continue;
    1.12 +		}
    1.13 +		if ( scancode >= SDL_SCANCODE_1 && scancode <= SDL_SCANCODE_0 ) {
    1.14 +			 keymap[scancode] = SDLK_1 + ( scancode - SDL_SCANCODE_1 );
    1.15  			continue;
    1.16  		}
    1.17  
    1.18 @@ -175,7 +179,13 @@
    1.19  			int ch;
    1.20  			ch = (MapVirtualKey( vk, MAPVK_VK_TO_CHAR ) & 0x7FFF);
    1.21  			 if ( ch )
    1.22 -				 keymap[scancode] = ch;
    1.23 +			 {
    1.24 +				 if ( ch >= 'A' && ch <= 'Z' )
    1.25 +					keymap[scancode] =  SDLK_a + ( ch - 'A' );
    1.26 +				 else
    1.27 +					 keymap[scancode] = ch;
    1.28 +			 }
    1.29 +
    1.30  		}
    1.31      }
    1.32