aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/Input.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-10-26 20:47:30 +0100
committerArisotura <thetotalworm@gmail.com>2020-10-26 20:47:30 +0100
commitfc922ffb14da3aa087a7eebeb55d09cf3b856e0d (patch)
tree68ad639693d7b97d286e71364ac796bfaaeefd7b /src/frontend/qt_sdl/Input.cpp
parent8d42b1c7d7466abf80a61ea51ee3006110c15b65 (diff)
parent49a96f41daa53ffa5dc4a46bdac4ee68f0b7eaee (diff)
Merge branch 'master' into dsi_camera
# Conflicts: # src/DSi_I2C.cpp
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])