aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/Input.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/qt_sdl/Input.cpp')
-rw-r--r--src/frontend/qt_sdl/Input.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/Input.cpp b/src/frontend/qt_sdl/Input.cpp
index 84d20ad..11b64cc 100644
--- a/src/frontend/qt_sdl/Input.cpp
+++ b/src/frontend/qt_sdl/Input.cpp
@@ -98,7 +98,9 @@ int GetEventKeyVal(QKeyEvent* event)
void KeyPress(QKeyEvent* event)
{
int keyHK = GetEventKeyVal(event);
- int keyKP = keyHK & ~event->modifiers();
+ int keyKP = keyHK;
+ if (event->modifiers() != Qt::KeypadModifier)
+ keyKP &= ~event->modifiers();
for (int i = 0; i < 12; i++)
if (keyKP == Config::KeyMapping[i])
@@ -112,7 +114,9 @@ void KeyPress(QKeyEvent* event)
void KeyRelease(QKeyEvent* event)
{
int keyHK = GetEventKeyVal(event);
- int keyKP = keyHK & ~event->modifiers();
+ int keyKP = keyHK;
+ if (event->modifiers() != Qt::KeypadModifier)
+ keyKP &= ~event->modifiers();
for (int i = 0; i < 12; i++)
if (keyKP == Config::KeyMapping[i])