Skip to content

Commit

Permalink
chore: define more key bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
francisdb committed Jan 25, 2024
1 parent 71b28e2 commit 228a652
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/unix/video-drivers/sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,54 @@ int sdl_keycode_to_key(const SDL_Keycode key_code)
return KEY_ALT;
case SDLK_RALT:
return KEY_ALTGR;
case SDLK_CAPSLOCK:
return KEY_CAPSLOCK;
case SDLK_INSERT:
return KEY_INSERT;
case SDLK_DELETE:
return KEY_DEL;
case SDLK_HOME:
return KEY_HOME;
case SDLK_END:
return KEY_END;
case SDLK_PAGEUP:
return KEY_PGUP;
case SDLK_PAGEDOWN:
return KEY_PGDN;
case SDLK_MENU:
return KEY_MENU;
case SDLK_KP_ENTER:
return KEYCODE_ENTER_PAD;
case SDLK_KP_PLUS:
return KEY_PLUS_PAD;
case SDLK_KP_MINUS:
return KEY_MINUS_PAD;
// case SDLK_KP_MULTIPLY:
// return KEY_ASTERISK;
case SDLK_KP_DIVIDE:
return KEY_SLASH_PAD;
// case SDLK_KP_PERIOD:
// return KEY_PERIOD_PAD;
case SDLK_KP_0:
return KEY_0_PAD;
case SDLK_KP_1:
return KEY_1_PAD;
case SDLK_KP_2:
return KEY_2_PAD;
case SDLK_KP_3:
return KEY_3_PAD;
case SDLK_KP_4:
return KEY_4_PAD;
case SDLK_KP_5:
return KEY_5_PAD;
case SDLK_KP_6:
return KEY_6_PAD;
case SDLK_KP_7:
return KEY_7_PAD;
case SDLK_KP_8:
return KEY_8_PAD;
case SDLK_KP_9:
return KEY_9_PAD;
default:
return KEY_NONE;
}
Expand Down

0 comments on commit 228a652

Please sign in to comment.