From ae883fb1f51fc610400854fa5a5ddde52e9f7bb2 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Sun, 20 Jan 2008 09:58:03 +0000
Subject: [PATCH] Fix ALT-modified extended keys (cannot possibly be Alt-Gr)

---
 src/conio/sdl_con.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conio/sdl_con.c b/src/conio/sdl_con.c
index e0f875c1b6..cf535a397e 100644
--- a/src/conio/sdl_con.c
+++ b/src/conio/sdl_con.c
@@ -1202,6 +1202,7 @@ unsigned int sdl_get_char_code(unsigned int keysym, unsigned int mod, unsigned i
 	 * Or there *IS* an SDL keysym.
 	 * Or ALT (Meta) pressed
 	 */
+fprintf(stderr,"Unicode: %08x  KeySym: %04x  Mod: %08x\n",unicode,keysym,mod);
 	if((!unicode) || (keysym > SDLK_FIRST && keysym < SDLK_LAST) || (mod & (KMOD_META|KMOD_ALT))) {
 
 		/* Find the SDL keysym */
@@ -1229,7 +1230,7 @@ unsigned int sdl_get_char_code(unsigned int keysym, unsigned int mod, unsigned i
 				if(mod & (KMOD_META|KMOD_ALT)) {
 
 					/* Yes, this is a "normal" ALT combo */
-					if(unicode==expect)
+					if(unicode==expect || unicode == 0)
 						return(sdl_keyval[i].alt);
 
 					/* AltGr apparently... translate unicode or give up */
-- 
GitLab