Mercurial > sdl-ios-xcode
diff src/video/fbcon/SDL_fbevents.c @ 1787:15ae67aa6b4b
Fixed bug #201
Here's a patch for SDL_fbevents.c that makes SDL fbcon recognize both left Alt
and right Alt (altgr). Without this, it's impossible to write a lot of
characters on a standard fi-latin1 mapped keyboard, like "@£${[]}\|~".
/Jonatan
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 09 May 2006 07:05:35 +0000 |
parents | d8030f368b84 |
children | c121d94672cb a1b03ba2fcd0 |
line wrap: on
line diff
--- a/src/video/fbcon/SDL_fbevents.c Tue May 09 06:44:47 2006 +0000 +++ b/src/video/fbcon/SDL_fbevents.c Tue May 09 07:05:35 2006 +0000 @@ -1115,6 +1115,12 @@ case SCANCODE_LEFTWIN: keymap[i] = SDLK_LSUPER; break; + case SCANCODE_LEFTALT: + keymap[i] = SDLK_LALT; + break; + case SCANCODE_RIGHTALT: + keymap[i] = SDLK_RALT; + break; case 127: keymap[i] = SDLK_MENU; break; @@ -1216,10 +1222,10 @@ if ( modstate & KMOD_CTRL ) { map |= (1<<KG_CTRL); } - if ( modstate & KMOD_ALT ) { + if ( modstate & KMOD_LALT ) { map |= (1<<KG_ALT); } - if ( modstate & KMOD_MODE ) { + if ( modstate & KMOD_RALT ) { map |= (1<<KG_ALTGR); } if ( KTYP(vga_keymap[map][scancode]) == KT_LETTER ) {