diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-06-18 16:23:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-19 12:22:34 +0200 |
commit | c4e25a8d5fc2d840c78fbddea06d32bf34b89083 (patch) | |
tree | 893ced433ad0e3edf8e74148ba8f218bf2ff1963 | |
parent | cabbad3ff6732e07d614eb743a59496d73aabb28 (diff) | |
download | qtwebkit-c4e25a8d5fc2d840c78fbddea06d32bf34b89083.tar.gz |
[Qt] Set windows key-code for multimedia keys
https://bugs.webkit.org/show_bug.cgi?id=117535
Reviewed by Jocelyn Turcotte.
Map Qt Key-events to their defined windows keycode values.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::windowsKeyCodeForKeyEvent):
Change-Id: If7dbf14afbcd60d0454334c9bd0a487d3b74b08c
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r-- | Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp index 5123a8d8c..c2ebcd02e 100644 --- a/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp +++ b/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp @@ -433,13 +433,22 @@ int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad) // VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key // VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key // VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key - // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key - // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key - // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key - // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key - // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key - // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key - // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key + + case Qt::Key_VolumeMute: + return VK_VOLUME_MUTE; // (AD) Windows 2000/XP: Volume Mute key + case Qt::Key_VolumeDown: + return VK_VOLUME_DOWN; // (AE) Windows 2000/XP: Volume Down key + case Qt::Key_VolumeUp: + return VK_VOLUME_UP; // (AF) Windows 2000/XP: Volume Up key + case Qt::Key_MediaNext: + return VK_MEDIA_NEXT_TRACK; // (B0) Windows 2000/XP: Next Track key + case Qt::Key_MediaPrevious: + return VK_MEDIA_PREV_TRACK; // (B1) Windows 2000/XP: Previous Track key + case Qt::Key_MediaStop: + return VK_MEDIA_STOP; // (B2) Windows 2000/XP: Stop Media key + case Qt::Key_MediaTogglePlayPause: + return VK_MEDIA_PLAY_PAUSE; // (B3) Windows 2000/XP: Play/Pause Media key + // VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key // VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key |