Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
slouken committed May 9, 2006
1 parent 1c443ed commit 8afe18f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/video/fbcon/SDL_fbevents.c
Expand Up @@ -1115,6 +1115,12 @@ void FB_InitOSKeymap(_THIS)
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;
Expand Down Expand Up @@ -1216,10 +1222,10 @@ static SDL_keysym *TranslateKey(int scancode, SDL_keysym *keysym)
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 ) {
Expand Down

0 comments on commit 8afe18f

Please sign in to comment.