summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-06-13 16:46:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-17 13:59:44 +0200
commita5ecb0bcfd0295723ef6c58136397b9455ec482c (patch)
treeeb327611ae151d705ed6841746c4ce00c266cb1d /src/plugins/platforms
parentd135a311a34e693d761a3607663b0879be9bbf65 (diff)
Android Mute and FastForward keys mapped wrong
KEYCODE_MEDIA_FAST_FORWARD is mapped to Qt::Key_Forward, which undoes Back. I believe the best match in Qt would be Qt::Key_AudioForward which is also mapped by XCB from XF86XK_AudioForward /* fast-forward audio track */ KEYCODE_MUTE is mapped to Qt::Key_Volume_Mute, but the mute button is for muting the microphone, the volume mute is called KEYCODE_VOLUME_MUTE. Change-Id: Id0b78c9bde78faef1f5d31019693e6c466941d70 Reviewed-by: BogDan Vatra <bogdan@kde.org>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/android/src/androidjniinput.cpp11
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/platforms/android/src/androidjniinput.cpp b/src/plugins/platforms/android/src/androidjniinput.cpp
index 29ccfe0125..75cb617ca8 100644
--- a/src/plugins/platforms/android/src/androidjniinput.cpp
+++ b/src/plugins/platforms/android/src/androidjniinput.cpp
@@ -333,7 +333,7 @@ namespace QtAndroidInput
return Qt::Key_BracketLeft;
case 0x0000005a: // KEYCODE_MEDIA_FAST_FORWARD
- return Qt::Key_Forward;
+ return Qt::Key_AudioForward;
case 0x00000057:
return Qt::Key_MediaNext;
@@ -344,7 +344,7 @@ namespace QtAndroidInput
case 0x00000058:
return Qt::Key_MediaPrevious;
- case 0x00000059:
+ case 0x00000059: // KEYCODE_MEDIA_REWIND
return Qt::Key_AudioRewind;
case 0x00000056:
@@ -356,8 +356,8 @@ namespace QtAndroidInput
case 0x00000045:
return Qt::Key_Minus;
- case 0x0000005b:
- return Qt::Key_VolumeMute;
+ case 0x0000005b: // KEYCODE_MUTE
+ return Qt::Key_MicMute;
case 0x0000004e:
return Qt::Key_NumLock;
@@ -405,6 +405,9 @@ namespace QtAndroidInput
case 0x00000019:
return Qt::Key_VolumeDown;
+ case 0x000000a4: // KEYCODE_VOLUME_MUTE
+ return Qt::Key_VolumeMute;
+
case 0x00000018:
return Qt::Key_VolumeUp;
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 155b327315..db53e7471e 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -248,6 +248,7 @@
#define XF86XK_TouchpadToggle 0x1008FFA9
#define XF86XK_TouchpadOn 0x1008FFB0
#define XF86XK_TouchpadOff 0x1008FFB1
+#define XF86XK_AudioMicMute 0x1008FFB2
// end of XF86keysyms.h
@@ -543,6 +544,7 @@ static const unsigned int KeyTbl[] = {
XF86XK_TouchpadToggle, Qt::Key_TouchpadToggle,
XF86XK_TouchpadOn, Qt::Key_TouchpadOn,
XF86XK_TouchpadOff, Qt::Key_TouchpadOff,
+ XF86XK_AudioMicMute, Qt::Key_MicMute,
XF86XK_Launch0, Qt::Key_Launch2, // ### Qt 6: remap properly
XF86XK_Launch1, Qt::Key_Launch3,
XF86XK_Launch2, Qt::Key_Launch4,