1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-29 19:40:35 +00:00

fixed Ctrl+keys on some systems

This commit is contained in:
Zeno Rogue 2022-06-23 09:34:21 +02:00
parent e691c63abe
commit 11c4b7974f

View File

@ -1056,6 +1056,9 @@ EX void handle_event(SDL_Event& ev) {
}
#else
uni = ev.key.keysym.unicode;
if(uni == 0 && (sym >= 'a' && sym <= 'z')) {
if(ev.key.keysym.mod & (KMOD_LCTRL | KMOD_RCTRL)) uni = sym - 96;
}
if(ev.key.keysym.mod & (KMOD_LSHIFT | KMOD_RSHIFT)) shiftmul = -1;
if(ev.key.keysym.mod & (KMOD_LCTRL | KMOD_RCTRL)) shiftmul /= 10;
#endif