]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Don't allow shortcuts with Ctrl+Alt because on Windows they can be used as the AltGr...
authorterencehill <piuntn@gmail.com>
Tue, 9 Apr 2019 15:55:40 +0000 (17:55 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 9 Apr 2019 15:55:40 +0000 (17:55 +0200)
keys.c

diff --git a/keys.c b/keys.c
index e93f83ac95504136e3605ce7a1ba0a15ae0faf67..d13c25da98bab1fe59c86d5f51e1bb02d8a4c198 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -726,6 +726,11 @@ Key_Console (int key, int unicode)
                break;
        }
 
+       // Don't allow shortcuts with Ctrl+Alt because on Windows they can be used
+       // as the AltGr key (which generates Ctrl+Alt) to type special characters
+       if (keydown[K_CTRL] && keydown[K_ALT])
+               goto add_char;
+
        if ((key == 'v' && keydown[K_CTRL]) || ((key == K_INS || key == K_KP_INS) && keydown[K_SHIFT]))
        {
                char *cbd, *p;
@@ -1154,6 +1159,8 @@ Key_Console (int key, int unicode)
                return;
        }
 
+       add_char:
+
        // non printable
        if (unicode < 32)
                return;