summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/src/androidjniinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/android/src/androidjniinput.cpp')
-rw-r--r--src/plugins/platforms/android/src/androidjniinput.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/plugins/platforms/android/src/androidjniinput.cpp b/src/plugins/platforms/android/src/androidjniinput.cpp
index 75cb617ca8..4a2d87d6a4 100644
--- a/src/plugins/platforms/android/src/androidjniinput.cpp
+++ b/src/plugins/platforms/android/src/androidjniinput.cpp
@@ -222,24 +222,11 @@ namespace QtAndroidInput
m_touchPoints.push_back(touchPoint);
}
- static void touchEnd(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint action)
+ static void touchEnd(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint /*action*/)
{
if (m_touchPoints.isEmpty())
return;
- QEvent::Type eventType = QEvent::None;
- switch (action) {
- case 0:
- eventType = QEvent::TouchBegin;
- break;
- case 1:
- eventType = QEvent::TouchUpdate;
- break;
- case 2:
- eventType = QEvent::TouchEnd;
- break;
- }
-
QAndroidPlatformIntegration *platformIntegration = QtAndroid::androidPlatformIntegration();
QTouchDevice *touchDevice = platformIntegration->touchDevice();
if (touchDevice == 0) {
@@ -411,6 +398,24 @@ namespace QtAndroidInput
case 0x00000018:
return Qt::Key_VolumeUp;
+ case 0x000000b7: // KEYCODE_PROG_RED
+ return Qt::Key_Red;
+
+ case 0x000000b8: // KEYCODE_PROG_GREEN
+ return Qt::Key_Green;
+
+ case 0x000000b9: // KEYCODE_PROG_YELLOW
+ return Qt::Key_Yellow;
+
+ case 0x000000ba: // KEYCODE_PROG_BLUE
+ return Qt::Key_Blue;
+
+ case 0x000000a6: // KEYCODE_CHANNEL_UP
+ return Qt::Key_ChannelUp;
+
+ case 0x000000a7: // KEYCODE_CHANNEL_DOWN
+ return Qt::Key_ChannelDown;
+
case 0x00000000: // KEYCODE_UNKNOWN
case 0x00000011: // KEYCODE_STAR ?!?!?
case 0x00000012: // KEYCODE_POUND ?!?!?