Mercurial > sdl-ios-xcode
changeset 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 | 473abd216edb |
children | e02263385643 |
files | src/video/fbcon/SDL_fbevents.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
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 ) {