Fixed bug #201
authorSam Lantinga <slouken@libsdl.org>
Tue, 09 May 2006 07:05:35 +0000
changeset 1787 15ae67aa6b4b
parent 1786 473abd216edb
child 1788 e02263385643
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
src/video/fbcon/SDL_fbevents.c
--- 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 ) {