This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The ideas: | |
// - Initialize varying key to SDL_SCANCODE_UNKNOWN | |
// - On KeyPress, retrieve the actual ASCII code corresponding to the letter, and map related input | |
static void ImGui_ImplSDL2_SetScancodeFromLetter(ImGuiIO& io, int scanCode, int ascii) | |
{ | |
switch (ascii) | |
{ | |
case 'a': case 'A': | |
io.KeyMap[ImGuiKey_A] = scanCode; |