Fixes #104 Control keys don't work correctly (#130)

This commit is contained in:
Stefan Arentz 2017-01-13 21:29:25 -05:00 committed by GitHub
parent a1536aa351
commit 7acae93861
1 changed files with 1 additions and 3 deletions

View File

@ -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) {