Skip to content

Commit

Permalink
[SDL] + fix numeric key bindings on SDL
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghitamutu committed Sep 1, 2024
1 parent e1bdb49 commit eb39e9b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AppCUI/src/Terminal/SDLTerminal/SDLTerminalInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ bool SDLTerminal::InitInput(const Application::InitializationData&)
KeyTranslation[static_cast<SDL_Scancode>(SDL_SCANCODE_A + i)] = static_cast<Key>(((uint32) Key::A) + i);
}

for (size_t i = 0; i < 10; i++)
KeyTranslation[static_cast<SDL_Scancode>(SDL_SCANCODE_0)] = static_cast<Key>((uint32) Key::N0);
for (size_t i = 1; i < 10; i++)
{
KeyTranslation[static_cast<SDL_Scancode>(SDL_SCANCODE_0 + i)] = static_cast<Key>(((uint32) Key::N0) + i);
KeyTranslation[static_cast<SDL_Scancode>(SDL_SCANCODE_1 + i)] = static_cast<Key>(((uint32) Key::N1) + i);
}

for (size_t i = 0; i < 12; i++)
Expand Down

0 comments on commit eb39e9b

Please sign in to comment.