mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
fix: Shortcuts not working correctly with non-western keyboards
This commit is contained in:
@@ -1044,7 +1044,7 @@ namespace hex {
|
||||
|
||||
#if !defined(OS_WEB)
|
||||
// Register key press callback
|
||||
glfwSetKeyCallback(this->m_window, [](GLFWwindow *window, int key, int scancode, int action, int mods) {
|
||||
glfwSetKeyCallback(this->m_window, [](GLFWwindow *window, int key, int, int action, int mods) {
|
||||
hex::unused(mods);
|
||||
|
||||
auto win = static_cast<Window *>(glfwGetWindowUserPointer(window));
|
||||
@@ -1057,10 +1057,6 @@ namespace hex {
|
||||
|
||||
if (key == GLFW_KEY_UNKNOWN) return;
|
||||
|
||||
auto keyName = glfwGetKeyName(key, scancode);
|
||||
if (keyName != nullptr)
|
||||
key = std::toupper(keyName[0]);
|
||||
|
||||
if (action == GLFW_PRESS || action == GLFW_REPEAT) {
|
||||
if (key != GLFW_KEY_LEFT_CONTROL && key != GLFW_KEY_RIGHT_CONTROL &&
|
||||
key != GLFW_KEY_LEFT_ALT && key != GLFW_KEY_RIGHT_ALT &&
|
||||
|
||||
Reference in New Issue
Block a user