+ case K_KP_SLASH: key = '/'; break;
+ case K_KP_MINUS: key = '-'; break;
+ case K_KP_PLUS: key = '+'; break;
+ case K_KP_HOME: key = '7'; break;
+ case K_KP_UPARROW: key = '8'; break;
+ case K_KP_PGUP: key = '9'; break;
+ case K_KP_LEFTARROW: key = '4'; break;
+ case K_KP_5: key = '5'; break;
+ case K_KP_RIGHTARROW: key = '6'; break;
+ case K_KP_END: key = '1'; break;
+ case K_KP_DOWNARROW: key = '2'; break;
+ case K_KP_PGDN: key = '3'; break;
+ case K_KP_INS: key = '0'; break;
+ case K_KP_DEL: key = '.'; break;
+ }
+
+ // Forbid Ctrl Alt shortcuts since on Windows they are used to type some characters
+ // in certain non-English keyboards using the AltGr key (which emulates Ctrl Alt)
+ // Reference: "Why Ctrl+Alt shouldn't be used as a shortcut modifier"
+ // https://blogs.msdn.microsoft.com/oldnewthing/20040329-00/?p=40003
+ if (keydown[K_CTRL] && keydown[K_ALT])
+ goto add_char;
+
+ if ((key == 'v' && KM_CTRL) || ((key == K_INS || key == K_KP_INS) && KM_SHIFT))