From 6252fd399ad7cb2713e73ed6f9c58afd668bfd8d Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 5 Feb 2025 20:09:24 +0100 Subject: [PATCH] fix: Loading/Storing of shortcut keys --- lib/libimhex/source/helpers/keys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libimhex/source/helpers/keys.cpp b/lib/libimhex/source/helpers/keys.cpp index 91fab6e06..68bbff4f8 100644 --- a/lib/libimhex/source/helpers/keys.cpp +++ b/lib/libimhex/source/helpers/keys.cpp @@ -116,7 +116,7 @@ Keys scanCodeToKey(int scanCode) { case GLFW_KEY_KP_ENTER: return Keys::KeyPadEnter; case GLFW_KEY_KP_EQUAL: return Keys::KeyPadEqual; case GLFW_KEY_MENU: return Keys::Menu; - default: return Keys::Invalid; + default: return Keys(scanCode); } } @@ -234,6 +234,6 @@ int keyToScanCode(Keys key) { case Keys::KeyPadEnter: return GLFW_KEY_KP_ENTER; case Keys::KeyPadEqual: return GLFW_KEY_KP_EQUAL; case Keys::Menu: return GLFW_KEY_MENU; - default: return 0; + default: return int(key); } } \ No newline at end of file