ux: Properly use current key layout for shortcuts

This commit is contained in:
WerWolv
2021-03-26 21:40:35 +01:00
parent 2c3a6d38ab
commit 42461c467f
3 changed files with 13 additions and 8 deletions

View File

@@ -612,6 +612,11 @@ namespace hex {
});
glfwSetKeyCallback(this->m_window, [](GLFWwindow *window, int key, int scancode, int action, int mods) {
auto keyName = glfwGetKeyName(key, scancode);
if (keyName != nullptr)
key = std::toupper(keyName[0]);
if (action == GLFW_PRESS) {
Window::s_currShortcut = { key, mods };
auto &io = ImGui::GetIO();