From d5a980df97051dea4b952a1f7c9558316454ccf0 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 8 Jan 2021 11:54:53 +0100 Subject: [PATCH] Send Qt::Key_MediaTogglePlayPause for VK_MEDIA_PLAY_PAUSE Speculative fix to get the right keys in WebEngine Pick-to: 6.0 5.15 Fixes: QTBUG-89915 Change-Id: I79519b715a1415dccfc4601aae5025b3222a79ae Reviewed-by: Friedemann Kleint Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowskeymapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index 0075578047..7365401089 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -389,7 +389,8 @@ static const uint KeyTbl[] = { // Keyboard mapping table Qt::Key_MediaNext, // 176 0xB0 VK_MEDIA_NEXT_TRACK | Next Track key Qt::Key_MediaPrevious, //177 0xB1 VK_MEDIA_PREV_TRACK | Previous Track key Qt::Key_MediaStop, // 178 0xB2 VK_MEDIA_STOP | Stop Media key - Qt::Key_MediaPlay, // 179 0xB3 VK_MEDIA_PLAY_PAUSE | Play/Pause Media key + Qt::Key_MediaTogglePlayPause, + // 179 0xB3 VK_MEDIA_PLAY_PAUSE | Play/Pause Media key Qt::Key_LaunchMail, // 180 0xB4 VK_LAUNCH_MAIL | Start Mail key Qt::Key_LaunchMedia,// 181 0xB5 VK_LAUNCH_MEDIA_SELECT Select Media key Qt::Key_Launch0, // 182 0xB6 VK_LAUNCH_APP1 | Start Application 1 key