summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-10-31 12:13:52 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2014-10-31 12:30:34 +0100
commitfd0446f418a74646ddf4325412d0a60e8091ebc1 (patch)
tree34db15b0e62aa06a04d1808bc6e13eec080aab15
parentb119b41b4b11a3555e45b7a52f4872cdb30507a7 (diff)
Add mappings from new Qt key values to key identifiers
Change-Id: Iab57bbe15c6fd4d33dfe6e36cd0bd01ca6644841 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
-rw-r--r--Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
index f6c4df777..a0e67e494 100644
--- a/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
+++ b/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
@@ -119,10 +119,8 @@ String keyIdentifierForQtKeyCode(int keyCode)
case Qt::Key_Return:
case Qt::Key_Enter:
return ASCIILiteral("Enter");
- // 'Find'
case Qt::Key_Help:
return ASCIILiteral("Help");
- // 'Info'
case Qt::Key_Menu:
case Qt::Key_MenuKB:
return ASCIILiteral("Menu");
@@ -136,7 +134,6 @@ String keyIdentifierForQtKeyCode(int keyCode)
return ASCIILiteral("Cancel");
case Qt::Key_Escape:
return ASCIILiteral("Esc");
- // 'Exit'
case Qt::Key_Zoom:
return ASCIILiteral("Zoom");
case Qt::Key_Comma:
@@ -213,7 +210,6 @@ String keyIdentifierForQtKeyCode(int keyCode)
return ASCIILiteral("Insert");
case Qt::Key_Paste:
return ASCIILiteral("Paste");
- // 'Undo'
case Qt::Key_Dead_Grave:
return ASCIILiteral("DeadGrave");
case Qt::Key_Dead_Acute:
@@ -324,6 +320,20 @@ String keyIdentifierForQtKeyCode(int keyCode)
return ASCIILiteral("Red");
case Qt::Key_Yellow:
return ASCIILiteral("Yellow");
+#if QT_VERSION >= QT_VERSION_CHECK(5,4,0)
+ case Qt::Key_Find:
+ return ASCIILiteral("Find");
+ case Qt::Key_Info:
+ return ASCIILiteral("Info");
+ case Qt::Key_Exit:
+ return ASCIILiteral("Exit");
+ case Qt::Key_Undo:
+ return ASCIILiteral("Undo");
+ case Qt::Key_Guide:
+ return ASCIILiteral("Guide");
+ case Qt::Key_Settings:
+ return ASCIILiteral("Settings");
+#endif
// Keys we have returned U+charcode for in the past.
// FIXME: Change them to correct standard values if others do.
case Qt::Key_Tab: