comparison 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
comparison
equal deleted inserted replaced
1786:473abd216edb 1787:15ae67aa6b4b
1113 keymap[i] = SDLK_RSUPER; 1113 keymap[i] = SDLK_RSUPER;
1114 break; 1114 break;
1115 case SCANCODE_LEFTWIN: 1115 case SCANCODE_LEFTWIN:
1116 keymap[i] = SDLK_LSUPER; 1116 keymap[i] = SDLK_LSUPER;
1117 break; 1117 break;
1118 case SCANCODE_LEFTALT:
1119 keymap[i] = SDLK_LALT;
1120 break;
1121 case SCANCODE_RIGHTALT:
1122 keymap[i] = SDLK_RALT;
1123 break;
1118 case 127: 1124 case 127:
1119 keymap[i] = SDLK_MENU; 1125 keymap[i] = SDLK_MENU;
1120 break; 1126 break;
1121 /* this should take care of all standard ascii keys */ 1127 /* this should take care of all standard ascii keys */
1122 default: 1128 default:
1214 map |= (1<<KG_SHIFT); 1220 map |= (1<<KG_SHIFT);
1215 } 1221 }
1216 if ( modstate & KMOD_CTRL ) { 1222 if ( modstate & KMOD_CTRL ) {
1217 map |= (1<<KG_CTRL); 1223 map |= (1<<KG_CTRL);
1218 } 1224 }
1219 if ( modstate & KMOD_ALT ) { 1225 if ( modstate & KMOD_LALT ) {
1220 map |= (1<<KG_ALT); 1226 map |= (1<<KG_ALT);
1221 } 1227 }
1222 if ( modstate & KMOD_MODE ) { 1228 if ( modstate & KMOD_RALT ) {
1223 map |= (1<<KG_ALTGR); 1229 map |= (1<<KG_ALTGR);
1224 } 1230 }
1225 if ( KTYP(vga_keymap[map][scancode]) == KT_LETTER ) { 1231 if ( KTYP(vga_keymap[map][scancode]) == KT_LETTER ) {
1226 if ( modstate & KMOD_CAPS ) { 1232 if ( modstate & KMOD_CAPS ) {
1227 map ^= (1<<KG_SHIFT); 1233 map ^= (1<<KG_SHIFT);