From 985ebe32f2ed9c899b26c98ccad2d1a08fa2326c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 2 Jul 2014 15:44:49 +0200 Subject: Support multimedia keys on Windows We currently do not receive events from most multimedia keys on Windows because they are sent using appcommand events instead of the normal key events. This patchs adds support for parsing appcommand events. Change-Id: I19f568b6fa0d3d136e3a22318df1499a1fab6edb Reviewed-by: Oliver Wolff --- src/gui/kernel/qkeysequence.cpp | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'src/gui/kernel/qkeysequence.cpp') diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 59cdabbc0f5..8261ac7208c 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -490,7 +490,7 @@ static const struct { { Qt::Key_BrightnessAdjust, QT_TRANSLATE_NOOP("QShortcut", "Adjust Brightness") }, { Qt::Key_Finance, QT_TRANSLATE_NOOP("QShortcut", "Finance") }, { Qt::Key_Community, QT_TRANSLATE_NOOP("QShortcut", "Community") }, - { Qt::Key_AudioRewind, QT_TRANSLATE_NOOP("QShortcut", "Audio Rewind") }, + { Qt::Key_AudioRewind, QT_TRANSLATE_NOOP("QShortcut", "Media Rewind") }, { Qt::Key_BackForward, QT_TRANSLATE_NOOP("QShortcut", "Back Forward") }, { Qt::Key_ApplicationLeft, QT_TRANSLATE_NOOP("QShortcut", "Application Left") }, { Qt::Key_ApplicationRight, QT_TRANSLATE_NOOP("QShortcut", "Application Right") }, @@ -550,17 +550,40 @@ static const struct { { Qt::Key_Bluetooth, QT_TRANSLATE_NOOP("QShortcut", "Bluetooth") }, { Qt::Key_WLAN, QT_TRANSLATE_NOOP("QShortcut", "Wireless") }, { Qt::Key_UWB, QT_TRANSLATE_NOOP("QShortcut", "Ultra Wide Band") }, - { Qt::Key_AudioForward, QT_TRANSLATE_NOOP("QShortcut", "Audio Forward") }, + { Qt::Key_AudioForward, QT_TRANSLATE_NOOP("QShortcut", "Media Fast Forward") }, { Qt::Key_AudioRepeat, QT_TRANSLATE_NOOP("QShortcut", "Audio Repeat") }, { Qt::Key_AudioRandomPlay, QT_TRANSLATE_NOOP("QShortcut", "Audio Random Play") }, { Qt::Key_Subtitle, QT_TRANSLATE_NOOP("QShortcut", "Subtitle") }, { Qt::Key_AudioCycleTrack, QT_TRANSLATE_NOOP("QShortcut", "Audio Cycle Track") }, { Qt::Key_Time, QT_TRANSLATE_NOOP("QShortcut", "Time") }, - { Qt::Key_Select, QT_TRANSLATE_NOOP("QShortcut", "Select") }, + { Qt::Key_Hibernate, QT_TRANSLATE_NOOP("QShortcut", "Hibernate") }, { Qt::Key_View, QT_TRANSLATE_NOOP("QShortcut", "View") }, { Qt::Key_TopMenu, QT_TRANSLATE_NOOP("QShortcut", "Top Menu") }, + { Qt::Key_PowerDown, QT_TRANSLATE_NOOP("QShortcut", "Power Down") }, { Qt::Key_Suspend, QT_TRANSLATE_NOOP("QShortcut", "Suspend") }, - { Qt::Key_Hibernate, QT_TRANSLATE_NOOP("QShortcut", "Hibernate") }, + + { Qt::Key_MicMute, QT_TRANSLATE_NOOP("QShortcut", "Microphone Mute") }, + + { Qt::Key_Red, QT_TRANSLATE_NOOP("QShortcut", "Red") }, + { Qt::Key_Green, QT_TRANSLATE_NOOP("QShortcut", "Green") }, + { Qt::Key_Yellow, QT_TRANSLATE_NOOP("QShortcut", "Yellow") }, + { Qt::Key_Blue, QT_TRANSLATE_NOOP("QShortcut", "Blue") }, + + { Qt::Key_ChannelUp, QT_TRANSLATE_NOOP("QShortcut", "Channel Up") }, + { Qt::Key_ChannelDown, QT_TRANSLATE_NOOP("QShortcut", "Channel Down") }, + + { Qt::Key_Guide, QT_TRANSLATE_NOOP("QShortcut", "Guide") }, + { Qt::Key_Info, QT_TRANSLATE_NOOP("QShortcut", "Info") }, + { Qt::Key_Settings, QT_TRANSLATE_NOOP("QShortcut", "Settings") }, + + { Qt::Key_MicVolumeUp, QT_TRANSLATE_NOOP("QShortcut", "Microphone Volume Up") }, + { Qt::Key_MicVolumeDown, QT_TRANSLATE_NOOP("QShortcut", "Microphone Volume Down") }, + + { Qt::Key_New, QT_TRANSLATE_NOOP("QShortcut", "New") }, + { Qt::Key_Open, QT_TRANSLATE_NOOP("QShortcut", "Open") }, + { Qt::Key_Find, QT_TRANSLATE_NOOP("QShortcut", "Find") }, + { Qt::Key_Undo, QT_TRANSLATE_NOOP("QShortcut", "Undo") }, + { Qt::Key_Redo, QT_TRANSLATE_NOOP("QShortcut", "Redo") }, // -------------------------------------------------------------- // More consistent namings @@ -647,6 +670,7 @@ static const struct { { Qt::Key_Execute, QT_TRANSLATE_NOOP("QShortcut", "Execute") }, { Qt::Key_Play, QT_TRANSLATE_NOOP("QShortcut", "Play") }, { Qt::Key_Zoom, QT_TRANSLATE_NOOP("QShortcut", "Zoom") }, + { Qt::Key_Exit, QT_TRANSLATE_NOOP("QShortcut", "Exit") }, { 0, 0 } }; -- cgit v1.2.3