From 77a9057b84b401d1ba62f46f02a5e10109d47f7b Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 12 Feb 2013 06:50:15 +0000 Subject: hotkey plugin: fixed key string git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3230 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/hotkey/hotkeymanager_win.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/plugins/General/hotkey/hotkeymanager_win.cpp b/src/plugins/General/hotkey/hotkeymanager_win.cpp index 12463bfa2..1acec3910 100644 --- a/src/plugins/General/hotkey/hotkeymanager_win.cpp +++ b/src/plugins/General/hotkey/hotkeymanager_win.cpp @@ -27,7 +27,6 @@ #include #include #include -#define _WIN32_WINNT 0x0500 #include #include #include @@ -47,14 +46,14 @@ quint32 Hotkey::defaultKey(int act) //default key bindings QMap keyMap; keyMap[PLAY] = 0; - keyMap[STOP] = VK_MEDIA_STOP; + keyMap[STOP] = 0; keyMap[PAUSE] = 0; - keyMap[PLAY_PAUSE] = VK_MEDIA_PLAY_PAUSE; - keyMap[NEXT] = VK_MEDIA_NEXT_TRACK; - keyMap[PREVIOUS] = VK_MEDIA_PREV_TRACK; + keyMap[PLAY_PAUSE] = 0; + keyMap[NEXT] = 0; + keyMap[PREVIOUS] = 0; keyMap[SHOW_HIDE] = 0; - keyMap[VOLUME_UP] = VK_VOLUME_UP; - keyMap[VOLUME_DOWN] = VK_VOLUME_DOWN; + keyMap[VOLUME_UP] = 0; + keyMap[VOLUME_DOWN] = 0; keyMap[FORWARD] = 0; keyMap[REWIND] = 0; keyMap[JUMP_TO_TRACK] = 0; @@ -218,6 +217,9 @@ const QString HotkeyManager::getKeyString(quint32 key, quint32 modifiers) LONG lScan = MapVirtualKey(key, 0) << 16; + if(key == VK_SHIFT || key == VK_CONTROL || key == VK_LWIN || key == VK_RWIN || key == VK_MENU) + return keyStr; + int nBufferLen = 64; std::wstring str; int nLen; -- cgit v1.2.3-13-gbd6f