mirror of
https://github.com/st3fan/ewm.git
synced 2025-01-15 12:31:09 +00:00
Fixes #104 Control keys don't work correctly
This commit is contained in:
parent
9df5355e31
commit
44d9c6e4ba
@ -390,9 +390,7 @@ static bool ewm_two_poll_event(struct ewm_two_t *two, SDL_Window *window) { // T
|
||||
case SDL_KEYDOWN:
|
||||
if (event.key.keysym.mod & KMOD_CTRL) {
|
||||
if (event.key.keysym.sym >= SDLK_a && event.key.keysym.sym <= SDLK_z) {
|
||||
two->key = (event.key.keysym.sym - SDLK_a) | 0x80;
|
||||
} else {
|
||||
// TODO Implement control codes 1b - 1f
|
||||
two->key = (event.key.keysym.sym - SDLK_a + 1) | 0x80;
|
||||
}
|
||||
} else if (event.key.keysym.mod & KMOD_GUI) {
|
||||
switch (event.key.keysym.sym) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user