mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-01-30 16:39:35 -06:00
ux: Properly use current key layout for shortcuts
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user