Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix missing keys on PLATFORM_DESKTOP_SDL #3539

Merged
merged 1 commit into from Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions src/platforms/rcore_desktop_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static PlatformData platform = { 0 }; // Platform specific data
//----------------------------------------------------------------------------------
// Local Variables Definition
//----------------------------------------------------------------------------------
#define SCANCODE_MAPPED_NUM 100
#define SCANCODE_MAPPED_NUM 232
static const KeyboardKey ScancodeToKey[SCANCODE_MAPPED_NUM] = {
KEY_NULL, // SDL_SCANCODE_UNKNOWN
0,
Expand Down Expand Up @@ -174,7 +174,28 @@ static const KeyboardKey ScancodeToKey[SCANCODE_MAPPED_NUM] = {
KEY_KP_8, // SDL_SCANCODE_KP_8
KEY_KP_9, // SDL_SCANCODE_KP_9
KEY_KP_0, // SDL_SCANCODE_KP_0
KEY_KP_DECIMAL // SDL_SCANCODE_KP_PERIOD
KEY_KP_DECIMAL, // SDL_SCANCODE_KP_PERIOD
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,
KEY_LEFT_CONTROL, //SDL_SCANCODE_LCTRL
KEY_LEFT_SHIFT, //SDL_SCANCODE_LSHIFT
KEY_LEFT_ALT, //SDL_SCANCODE_LALT
KEY_LEFT_SUPER, //SDL_SCANCODE_LGUI
KEY_RIGHT_CONTROL, //SDL_SCANCODE_RCTRL
KEY_RIGHT_SHIFT, //SDL_SCANCODE_RSHIFT
KEY_RIGHT_ALT, //SDL_SCANCODE_RALT
KEY_RIGHT_SUPER //SDL_SCANCODE_RGUI
};

static const int CursorsLUT[] = {
Expand Down
Loading