Skip to content

Commit

Permalink
Add extra keys
Browse files Browse the repository at this point in the history
  • Loading branch information
thedmd committed Jul 22, 2020
1 parent b335225 commit 6d91336
Show file tree
Hide file tree
Showing 8 changed files with 340 additions and 6 deletions.
42 changes: 42 additions & 0 deletions examples/imgui_impl_allegro5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,54 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
io.KeyMap[ImGuiKey_Enter] = ALLEGRO_KEY_ENTER;
io.KeyMap[ImGuiKey_Escape] = ALLEGRO_KEY_ESCAPE;
io.KeyMap[ImGuiKey_KeyPadEnter] = ALLEGRO_KEY_PAD_ENTER;
io.KeyMap[ImGuiKey_0] = ALLEGRO_KEY_0;
io.KeyMap[ImGuiKey_1] = ALLEGRO_KEY_1;
io.KeyMap[ImGuiKey_2] = ALLEGRO_KEY_2;
io.KeyMap[ImGuiKey_3] = ALLEGRO_KEY_3;
io.KeyMap[ImGuiKey_4] = ALLEGRO_KEY_4;
io.KeyMap[ImGuiKey_5] = ALLEGRO_KEY_5;
io.KeyMap[ImGuiKey_6] = ALLEGRO_KEY_6;
io.KeyMap[ImGuiKey_7] = ALLEGRO_KEY_7;
io.KeyMap[ImGuiKey_8] = ALLEGRO_KEY_8;
io.KeyMap[ImGuiKey_9] = ALLEGRO_KEY_9;
io.KeyMap[ImGuiKey_A] = ALLEGRO_KEY_A;
io.KeyMap[ImGuiKey_B] = ALLEGRO_KEY_B;
io.KeyMap[ImGuiKey_C] = ALLEGRO_KEY_C;
io.KeyMap[ImGuiKey_D] = ALLEGRO_KEY_D;
io.KeyMap[ImGuiKey_E] = ALLEGRO_KEY_E;
io.KeyMap[ImGuiKey_F] = ALLEGRO_KEY_F;
io.KeyMap[ImGuiKey_G] = ALLEGRO_KEY_G;
io.KeyMap[ImGuiKey_H] = ALLEGRO_KEY_H;
io.KeyMap[ImGuiKey_I] = ALLEGRO_KEY_I;
io.KeyMap[ImGuiKey_J] = ALLEGRO_KEY_J;
io.KeyMap[ImGuiKey_K] = ALLEGRO_KEY_K;
io.KeyMap[ImGuiKey_L] = ALLEGRO_KEY_L;
io.KeyMap[ImGuiKey_M] = ALLEGRO_KEY_M;
io.KeyMap[ImGuiKey_N] = ALLEGRO_KEY_N;
io.KeyMap[ImGuiKey_O] = ALLEGRO_KEY_O;
io.KeyMap[ImGuiKey_P] = ALLEGRO_KEY_P;
io.KeyMap[ImGuiKey_Q] = ALLEGRO_KEY_Q;
io.KeyMap[ImGuiKey_R] = ALLEGRO_KEY_R;
io.KeyMap[ImGuiKey_S] = ALLEGRO_KEY_S;
io.KeyMap[ImGuiKey_T] = ALLEGRO_KEY_T;
io.KeyMap[ImGuiKey_U] = ALLEGRO_KEY_U;
io.KeyMap[ImGuiKey_V] = ALLEGRO_KEY_V;
io.KeyMap[ImGuiKey_W] = ALLEGRO_KEY_W;
io.KeyMap[ImGuiKey_X] = ALLEGRO_KEY_X;
io.KeyMap[ImGuiKey_Y] = ALLEGRO_KEY_Y;
io.KeyMap[ImGuiKey_Z] = ALLEGRO_KEY_Z;
io.KeyMap[ImGuiKey_F1] = ALLEGRO_KEY_F1;
io.KeyMap[ImGuiKey_F2] = ALLEGRO_KEY_F2;
io.KeyMap[ImGuiKey_F3] = ALLEGRO_KEY_F3;
io.KeyMap[ImGuiKey_F4] = ALLEGRO_KEY_F4;
io.KeyMap[ImGuiKey_F5] = ALLEGRO_KEY_F5;
io.KeyMap[ImGuiKey_F6] = ALLEGRO_KEY_F6;
io.KeyMap[ImGuiKey_F7] = ALLEGRO_KEY_F7;
io.KeyMap[ImGuiKey_F8] = ALLEGRO_KEY_F8;
io.KeyMap[ImGuiKey_F9] = ALLEGRO_KEY_F9;
io.KeyMap[ImGuiKey_F10] = ALLEGRO_KEY_F10;
io.KeyMap[ImGuiKey_F11] = ALLEGRO_KEY_F11;
io.KeyMap[ImGuiKey_F12] = ALLEGRO_KEY_F12;
io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);

#if ALLEGRO_HAS_CLIPBOARD
Expand Down
42 changes: 42 additions & 0 deletions examples/imgui_impl_glfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,54 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
io.KeyMap[ImGuiKey_Enter] = GLFW_KEY_ENTER;
io.KeyMap[ImGuiKey_Escape] = GLFW_KEY_ESCAPE;
io.KeyMap[ImGuiKey_KeyPadEnter] = GLFW_KEY_KP_ENTER;
io.KeyMap[ImGuiKey_0] = GLFW_KEY_0;
io.KeyMap[ImGuiKey_1] = GLFW_KEY_1;
io.KeyMap[ImGuiKey_2] = GLFW_KEY_2;
io.KeyMap[ImGuiKey_3] = GLFW_KEY_3;
io.KeyMap[ImGuiKey_4] = GLFW_KEY_4;
io.KeyMap[ImGuiKey_5] = GLFW_KEY_5;
io.KeyMap[ImGuiKey_6] = GLFW_KEY_6;
io.KeyMap[ImGuiKey_7] = GLFW_KEY_7;
io.KeyMap[ImGuiKey_8] = GLFW_KEY_8;
io.KeyMap[ImGuiKey_9] = GLFW_KEY_9;
io.KeyMap[ImGuiKey_A] = GLFW_KEY_A;
io.KeyMap[ImGuiKey_B] = GLFW_KEY_B;
io.KeyMap[ImGuiKey_C] = GLFW_KEY_C;
io.KeyMap[ImGuiKey_D] = GLFW_KEY_D;
io.KeyMap[ImGuiKey_E] = GLFW_KEY_E;
io.KeyMap[ImGuiKey_F] = GLFW_KEY_F;
io.KeyMap[ImGuiKey_G] = GLFW_KEY_G;
io.KeyMap[ImGuiKey_H] = GLFW_KEY_H;
io.KeyMap[ImGuiKey_I] = GLFW_KEY_I;
io.KeyMap[ImGuiKey_J] = GLFW_KEY_J;
io.KeyMap[ImGuiKey_K] = GLFW_KEY_K;
io.KeyMap[ImGuiKey_L] = GLFW_KEY_L;
io.KeyMap[ImGuiKey_M] = GLFW_KEY_M;
io.KeyMap[ImGuiKey_N] = GLFW_KEY_N;
io.KeyMap[ImGuiKey_O] = GLFW_KEY_O;
io.KeyMap[ImGuiKey_P] = GLFW_KEY_P;
io.KeyMap[ImGuiKey_Q] = GLFW_KEY_Q;
io.KeyMap[ImGuiKey_R] = GLFW_KEY_R;
io.KeyMap[ImGuiKey_S] = GLFW_KEY_S;
io.KeyMap[ImGuiKey_T] = GLFW_KEY_T;
io.KeyMap[ImGuiKey_U] = GLFW_KEY_U;
io.KeyMap[ImGuiKey_V] = GLFW_KEY_V;
io.KeyMap[ImGuiKey_W] = GLFW_KEY_W;
io.KeyMap[ImGuiKey_X] = GLFW_KEY_X;
io.KeyMap[ImGuiKey_Y] = GLFW_KEY_Y;
io.KeyMap[ImGuiKey_Z] = GLFW_KEY_Z;
io.KeyMap[ImGuiKey_F1] = GLFW_KEY_F1;
io.KeyMap[ImGuiKey_F2] = GLFW_KEY_F2;
io.KeyMap[ImGuiKey_F3] = GLFW_KEY_F3;
io.KeyMap[ImGuiKey_F4] = GLFW_KEY_F4;
io.KeyMap[ImGuiKey_F5] = GLFW_KEY_F5;
io.KeyMap[ImGuiKey_F6] = GLFW_KEY_F6;
io.KeyMap[ImGuiKey_F7] = GLFW_KEY_F7;
io.KeyMap[ImGuiKey_F8] = GLFW_KEY_F8;
io.KeyMap[ImGuiKey_F9] = GLFW_KEY_F9;
io.KeyMap[ImGuiKey_F10] = GLFW_KEY_F10;
io.KeyMap[ImGuiKey_F11] = GLFW_KEY_F11;
io.KeyMap[ImGuiKey_F12] = GLFW_KEY_F12;

io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText;
io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText;
Expand Down
42 changes: 42 additions & 0 deletions examples/imgui_impl_glut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,54 @@ bool ImGui_ImplGLUT_Init()
io.KeyMap[ImGuiKey_Enter] = 13; // == CTRL+M
io.KeyMap[ImGuiKey_Escape] = 27;
io.KeyMap[ImGuiKey_KeyPadEnter] = 13; // == CTRL+M
io.KeyMap[ImGuiKey_0] = '0';
io.KeyMap[ImGuiKey_1] = '1';
io.KeyMap[ImGuiKey_2] = '2';
io.KeyMap[ImGuiKey_3] = '3';
io.KeyMap[ImGuiKey_4] = '4';
io.KeyMap[ImGuiKey_5] = '5';
io.KeyMap[ImGuiKey_6] = '6';
io.KeyMap[ImGuiKey_7] = '7';
io.KeyMap[ImGuiKey_8] = '8';
io.KeyMap[ImGuiKey_9] = '9';
io.KeyMap[ImGuiKey_A] = 'A';
io.KeyMap[ImGuiKey_B] = 'B';
io.KeyMap[ImGuiKey_C] = 'C';
io.KeyMap[ImGuiKey_D] = 'D';
io.KeyMap[ImGuiKey_E] = 'E';
io.KeyMap[ImGuiKey_F] = 'F';
io.KeyMap[ImGuiKey_G] = 'G';
io.KeyMap[ImGuiKey_H] = 'H';
io.KeyMap[ImGuiKey_I] = 'I';
io.KeyMap[ImGuiKey_J] = 'J';
io.KeyMap[ImGuiKey_K] = 'K';
io.KeyMap[ImGuiKey_L] = 'L';
io.KeyMap[ImGuiKey_M] = 'M';
io.KeyMap[ImGuiKey_N] = 'N';
io.KeyMap[ImGuiKey_O] = 'O';
io.KeyMap[ImGuiKey_P] = 'P';
io.KeyMap[ImGuiKey_Q] = 'Q';
io.KeyMap[ImGuiKey_R] = 'R';
io.KeyMap[ImGuiKey_S] = 'S';
io.KeyMap[ImGuiKey_T] = 'T';
io.KeyMap[ImGuiKey_U] = 'U';
io.KeyMap[ImGuiKey_V] = 'V';
io.KeyMap[ImGuiKey_W] = 'W';
io.KeyMap[ImGuiKey_X] = 'X';
io.KeyMap[ImGuiKey_Y] = 'Y';
io.KeyMap[ImGuiKey_Z] = 'Z';
io.KeyMap[ImGuiKey_F1] = 256 + GLUT_KEY_F1;
io.KeyMap[ImGuiKey_F2] = 256 + GLUT_KEY_F2;
io.KeyMap[ImGuiKey_F3] = 256 + GLUT_KEY_F3;
io.KeyMap[ImGuiKey_F4] = 256 + GLUT_KEY_F4;
io.KeyMap[ImGuiKey_F5] = 256 + GLUT_KEY_F5;
io.KeyMap[ImGuiKey_F6] = 256 + GLUT_KEY_F6;
io.KeyMap[ImGuiKey_F7] = 256 + GLUT_KEY_F7;
io.KeyMap[ImGuiKey_F8] = 256 + GLUT_KEY_F8;
io.KeyMap[ImGuiKey_F9] = 256 + GLUT_KEY_F9;
io.KeyMap[ImGuiKey_F10] = 256 + GLUT_KEY_F10;
io.KeyMap[ImGuiKey_F11] = 256 + GLUT_KEY_F11;
io.KeyMap[ImGuiKey_F12] = 256 + GLUT_KEY_F12;

return true;
}
Expand Down
40 changes: 40 additions & 0 deletions examples/imgui_impl_marmalade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,52 @@ bool ImGui_Marmalade_Init(bool install_callbacks)
io.KeyMap[ImGuiKey_Enter] = s3eKeyEnter;
io.KeyMap[ImGuiKey_Escape] = s3eKeyEsc;
io.KeyMap[ImGuiKey_KeyPadEnter] = s3eKeyNumPadEnter;
io.KeyMap[ImGuiKey_0] = s3eKey0;
io.KeyMap[ImGuiKey_1] = s3eKey1;
io.KeyMap[ImGuiKey_2] = s3eKey2;
io.KeyMap[ImGuiKey_3] = s3eKey3;
io.KeyMap[ImGuiKey_4] = s3eKey4;
io.KeyMap[ImGuiKey_5] = s3eKey5;
io.KeyMap[ImGuiKey_6] = s3eKey6;
io.KeyMap[ImGuiKey_7] = s3eKey7;
io.KeyMap[ImGuiKey_8] = s3eKey8;
io.KeyMap[ImGuiKey_9] = s3eKey9;
io.KeyMap[ImGuiKey_A] = s3eKeyA;
io.KeyMap[ImGuiKey_B] = s3eKeyB;
io.KeyMap[ImGuiKey_C] = s3eKeyC;
io.KeyMap[ImGuiKey_D] = s3eKeyD;
io.KeyMap[ImGuiKey_E] = s3eKeyE;
io.KeyMap[ImGuiKey_F] = s3eKeyF;
io.KeyMap[ImGuiKey_G] = s3eKeyG;
io.KeyMap[ImGuiKey_H] = s3eKeyH;
io.KeyMap[ImGuiKey_I] = s3eKeyI;
io.KeyMap[ImGuiKey_J] = s3eKeyJ;
io.KeyMap[ImGuiKey_K] = s3eKeyK;
io.KeyMap[ImGuiKey_L] = s3eKeyL;
io.KeyMap[ImGuiKey_M] = s3eKeyM;
io.KeyMap[ImGuiKey_N] = s3eKeyN;
io.KeyMap[ImGuiKey_O] = s3eKeyO;
io.KeyMap[ImGuiKey_P] = s3eKeyP;
io.KeyMap[ImGuiKey_Q] = s3eKeyQ;
io.KeyMap[ImGuiKey_R] = s3eKeyR;
io.KeyMap[ImGuiKey_S] = s3eKeyS;
io.KeyMap[ImGuiKey_T] = s3eKeyT;
io.KeyMap[ImGuiKey_U] = s3eKeyU;
io.KeyMap[ImGuiKey_V] = s3eKeyV;
io.KeyMap[ImGuiKey_W] = s3eKeyW;
io.KeyMap[ImGuiKey_X] = s3eKeyX;
io.KeyMap[ImGuiKey_Y] = s3eKeyY;
io.KeyMap[ImGuiKey_Z] = s3eKeyZ;
io.KeyMap[ImGuiKey_F1] = s3eKeyF1;
io.KeyMap[ImGuiKey_F2] = s3eKeyF2;
io.KeyMap[ImGuiKey_F3] = s3eKeyF3;
io.KeyMap[ImGuiKey_F4] = s3eKeyF4;
io.KeyMap[ImGuiKey_F5] = s3eKeyF5;
io.KeyMap[ImGuiKey_F6] = s3eKeyF6;
io.KeyMap[ImGuiKey_F7] = s3eKeyF7;
io.KeyMap[ImGuiKey_F8] = s3eKeyF8;
io.KeyMap[ImGuiKey_F9] = s3eKeyF9;
io.KeyMap[ImGuiKey_F10] = s3eKeyF10;

io.SetClipboardTextFn = ImGui_Marmalade_SetClipboardText;
io.GetClipboardTextFn = ImGui_Marmalade_GetClipboardText;
Expand Down
42 changes: 42 additions & 0 deletions examples/imgui_impl_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,54 @@ bool ImGui_ImplOSX_Init()
io.KeyMap[ImGuiKey_Enter] = 13;
io.KeyMap[ImGuiKey_Escape] = 27;
io.KeyMap[ImGuiKey_KeyPadEnter] = 13;
io.KeyMap[ImGuiKey_0] = '0';
io.KeyMap[ImGuiKey_1] = '1';
io.KeyMap[ImGuiKey_2] = '2';
io.KeyMap[ImGuiKey_3] = '3';
io.KeyMap[ImGuiKey_4] = '4';
io.KeyMap[ImGuiKey_5] = '5';
io.KeyMap[ImGuiKey_6] = '6';
io.KeyMap[ImGuiKey_7] = '7';
io.KeyMap[ImGuiKey_8] = '8';
io.KeyMap[ImGuiKey_9] = '9';
io.KeyMap[ImGuiKey_A] = 'A';
io.KeyMap[ImGuiKey_B] = 'B';
io.KeyMap[ImGuiKey_C] = 'C';
io.KeyMap[ImGuiKey_D] = 'D';
io.KeyMap[ImGuiKey_E] = 'E';
io.KeyMap[ImGuiKey_F] = 'F';
io.KeyMap[ImGuiKey_G] = 'G';
io.KeyMap[ImGuiKey_H] = 'H';
io.KeyMap[ImGuiKey_I] = 'I';
io.KeyMap[ImGuiKey_J] = 'J';
io.KeyMap[ImGuiKey_K] = 'K';
io.KeyMap[ImGuiKey_L] = 'L';
io.KeyMap[ImGuiKey_M] = 'M';
io.KeyMap[ImGuiKey_N] = 'N';
io.KeyMap[ImGuiKey_O] = 'O';
io.KeyMap[ImGuiKey_P] = 'P';
io.KeyMap[ImGuiKey_Q] = 'Q';
io.KeyMap[ImGuiKey_R] = 'R';
io.KeyMap[ImGuiKey_S] = 'S';
io.KeyMap[ImGuiKey_T] = 'T';
io.KeyMap[ImGuiKey_U] = 'U';
io.KeyMap[ImGuiKey_V] = 'V';
io.KeyMap[ImGuiKey_W] = 'W';
io.KeyMap[ImGuiKey_X] = 'X';
io.KeyMap[ImGuiKey_Y] = 'Y';
io.KeyMap[ImGuiKey_Z] = 'Z';
io.KeyMap[ImGuiKey_F1] = NSF1FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F2] = NSF2FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F3] = NSF3FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F4] = NSF4FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F5] = NSF5FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F6] = NSF6FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F7] = NSF7FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F8] = NSF8FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F9] = NSF9FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F10] = NSF10FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F11] = NSF11FunctionKey + offset_for_function_keys;
io.KeyMap[ImGuiKey_F12] = NSF12FunctionKey + offset_for_function_keys;

// Load cursors. Some of them are undocumented.
g_MouseCursorHidden = false;
Expand Down
42 changes: 42 additions & 0 deletions examples/imgui_impl_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,54 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window)
io.KeyMap[ImGuiKey_Enter] = SDL_SCANCODE_RETURN;
io.KeyMap[ImGuiKey_Escape] = SDL_SCANCODE_ESCAPE;
io.KeyMap[ImGuiKey_KeyPadEnter] = SDL_SCANCODE_KP_ENTER;
io.KeyMap[ImGuiKey_0] = SDL_SCANCODE_0;
io.KeyMap[ImGuiKey_1] = SDL_SCANCODE_1;
io.KeyMap[ImGuiKey_2] = SDL_SCANCODE_2;
io.KeyMap[ImGuiKey_3] = SDL_SCANCODE_3;
io.KeyMap[ImGuiKey_4] = SDL_SCANCODE_4;
io.KeyMap[ImGuiKey_5] = SDL_SCANCODE_5;
io.KeyMap[ImGuiKey_6] = SDL_SCANCODE_6;
io.KeyMap[ImGuiKey_7] = SDL_SCANCODE_7;
io.KeyMap[ImGuiKey_8] = SDL_SCANCODE_8;
io.KeyMap[ImGuiKey_9] = SDL_SCANCODE_9;
io.KeyMap[ImGuiKey_A] = SDL_SCANCODE_A;
io.KeyMap[ImGuiKey_B] = SDL_SCANCODE_B;
io.KeyMap[ImGuiKey_C] = SDL_SCANCODE_C;
io.KeyMap[ImGuiKey_D] = SDL_SCANCODE_D;
io.KeyMap[ImGuiKey_E] = SDL_SCANCODE_E;
io.KeyMap[ImGuiKey_F] = SDL_SCANCODE_F;
io.KeyMap[ImGuiKey_G] = SDL_SCANCODE_G;
io.KeyMap[ImGuiKey_H] = SDL_SCANCODE_H;
io.KeyMap[ImGuiKey_I] = SDL_SCANCODE_I;
io.KeyMap[ImGuiKey_J] = SDL_SCANCODE_J;
io.KeyMap[ImGuiKey_K] = SDL_SCANCODE_K;
io.KeyMap[ImGuiKey_L] = SDL_SCANCODE_L;
io.KeyMap[ImGuiKey_M] = SDL_SCANCODE_M;
io.KeyMap[ImGuiKey_N] = SDL_SCANCODE_N;
io.KeyMap[ImGuiKey_O] = SDL_SCANCODE_O;
io.KeyMap[ImGuiKey_P] = SDL_SCANCODE_P;
io.KeyMap[ImGuiKey_Q] = SDL_SCANCODE_Q;
io.KeyMap[ImGuiKey_R] = SDL_SCANCODE_R;
io.KeyMap[ImGuiKey_S] = SDL_SCANCODE_S;
io.KeyMap[ImGuiKey_T] = SDL_SCANCODE_T;
io.KeyMap[ImGuiKey_U] = SDL_SCANCODE_U;
io.KeyMap[ImGuiKey_V] = SDL_SCANCODE_V;
io.KeyMap[ImGuiKey_W] = SDL_SCANCODE_W;
io.KeyMap[ImGuiKey_X] = SDL_SCANCODE_X;
io.KeyMap[ImGuiKey_Y] = SDL_SCANCODE_Y;
io.KeyMap[ImGuiKey_Z] = SDL_SCANCODE_Z;
io.KeyMap[ImGuiKey_F1] = SDL_SCANCODE_F1;
io.KeyMap[ImGuiKey_F2] = SDL_SCANCODE_F2;
io.KeyMap[ImGuiKey_F3] = SDL_SCANCODE_F3;
io.KeyMap[ImGuiKey_F4] = SDL_SCANCODE_F4;
io.KeyMap[ImGuiKey_F5] = SDL_SCANCODE_F5;
io.KeyMap[ImGuiKey_F6] = SDL_SCANCODE_F6;
io.KeyMap[ImGuiKey_F7] = SDL_SCANCODE_F7;
io.KeyMap[ImGuiKey_F8] = SDL_SCANCODE_F8;
io.KeyMap[ImGuiKey_F9] = SDL_SCANCODE_F9;
io.KeyMap[ImGuiKey_F10] = SDL_SCANCODE_F10;
io.KeyMap[ImGuiKey_F11] = SDL_SCANCODE_F11;
io.KeyMap[ImGuiKey_F12] = SDL_SCANCODE_F12;

io.SetClipboardTextFn = ImGui_ImplSDL2_SetClipboardText;
io.GetClipboardTextFn = ImGui_ImplSDL2_GetClipboardText;
Expand Down
42 changes: 42 additions & 0 deletions examples/imgui_impl_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,54 @@ bool ImGui_ImplWin32_Init(void* hwnd)
io.KeyMap[ImGuiKey_Enter] = VK_RETURN;
io.KeyMap[ImGuiKey_Escape] = VK_ESCAPE;
io.KeyMap[ImGuiKey_KeyPadEnter] = VK_RETURN;
io.KeyMap[ImGuiKey_0] = '0';
io.KeyMap[ImGuiKey_1] = '1';
io.KeyMap[ImGuiKey_2] = '2';
io.KeyMap[ImGuiKey_3] = '3';
io.KeyMap[ImGuiKey_4] = '4';
io.KeyMap[ImGuiKey_5] = '5';
io.KeyMap[ImGuiKey_6] = '6';
io.KeyMap[ImGuiKey_7] = '7';
io.KeyMap[ImGuiKey_8] = '8';
io.KeyMap[ImGuiKey_9] = '9';
io.KeyMap[ImGuiKey_A] = 'A';
io.KeyMap[ImGuiKey_B] = 'B';
io.KeyMap[ImGuiKey_C] = 'C';
io.KeyMap[ImGuiKey_D] = 'D';
io.KeyMap[ImGuiKey_E] = 'E';
io.KeyMap[ImGuiKey_F] = 'F';
io.KeyMap[ImGuiKey_G] = 'G';
io.KeyMap[ImGuiKey_H] = 'H';
io.KeyMap[ImGuiKey_I] = 'I';
io.KeyMap[ImGuiKey_J] = 'J';
io.KeyMap[ImGuiKey_K] = 'K';
io.KeyMap[ImGuiKey_L] = 'L';
io.KeyMap[ImGuiKey_M] = 'M';
io.KeyMap[ImGuiKey_N] = 'N';
io.KeyMap[ImGuiKey_O] = 'O';
io.KeyMap[ImGuiKey_P] = 'P';
io.KeyMap[ImGuiKey_Q] = 'Q';
io.KeyMap[ImGuiKey_R] = 'R';
io.KeyMap[ImGuiKey_S] = 'S';
io.KeyMap[ImGuiKey_T] = 'T';
io.KeyMap[ImGuiKey_U] = 'U';
io.KeyMap[ImGuiKey_V] = 'V';
io.KeyMap[ImGuiKey_W] = 'W';
io.KeyMap[ImGuiKey_X] = 'X';
io.KeyMap[ImGuiKey_Y] = 'Y';
io.KeyMap[ImGuiKey_Z] = 'Z';
io.KeyMap[ImGuiKey_F1] = VK_F1;
io.KeyMap[ImGuiKey_F2] = VK_F2;
io.KeyMap[ImGuiKey_F3] = VK_F3;
io.KeyMap[ImGuiKey_F4] = VK_F4;
io.KeyMap[ImGuiKey_F5] = VK_F5;
io.KeyMap[ImGuiKey_F6] = VK_F6;
io.KeyMap[ImGuiKey_F7] = VK_F7;
io.KeyMap[ImGuiKey_F8] = VK_F8;
io.KeyMap[ImGuiKey_F9] = VK_F9;
io.KeyMap[ImGuiKey_F10] = VK_F10;
io.KeyMap[ImGuiKey_F11] = VK_F11;
io.KeyMap[ImGuiKey_F12] = VK_F12;

return true;
}
Expand Down
Loading

0 comments on commit 6d91336

Please sign in to comment.