Skip to content
Snippets Groups Projects
Commit ae883fb1 authored by deuce's avatar deuce
Browse files

Fix ALT-modified extended keys (cannot possibly be Alt-Gr)

parent 781f1114
Branches
Tags
No related merge requests found
...@@ -1202,6 +1202,7 @@ unsigned int sdl_get_char_code(unsigned int keysym, unsigned int mod, unsigned i ...@@ -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 there *IS* an SDL keysym.
* Or ALT (Meta) pressed * 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))) { if((!unicode) || (keysym > SDLK_FIRST && keysym < SDLK_LAST) || (mod & (KMOD_META|KMOD_ALT))) {
/* Find the SDL keysym */ /* Find the SDL keysym */
...@@ -1229,7 +1230,7 @@ unsigned int sdl_get_char_code(unsigned int keysym, unsigned int mod, unsigned i ...@@ -1229,7 +1230,7 @@ unsigned int sdl_get_char_code(unsigned int keysym, unsigned int mod, unsigned i
if(mod & (KMOD_META|KMOD_ALT)) { if(mod & (KMOD_META|KMOD_ALT)) {
/* Yes, this is a "normal" ALT combo */ /* Yes, this is a "normal" ALT combo */
if(unicode==expect) if(unicode==expect || unicode == 0)
return(sdl_keyval[i].alt); return(sdl_keyval[i].alt);
/* AltGr apparently... translate unicode or give up */ /* AltGr apparently... translate unicode or give up */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment