aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/hotkey/hotkeymanager.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-08-09 13:57:39 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-08-09 13:57:39 +0000
commitc840cac739329c18aba8397b593f358f35412d97 (patch)
treeacf61568a854ccf3569f6fec6c6b3136ca22a442 /src/plugins/General/hotkey/hotkeymanager.cpp
parentcdeb87c0597f075b6649a0270db8a511a325256a (diff)
downloadqmmp-c840cac739329c18aba8397b593f358f35412d97.tar.gz
qmmp-c840cac739329c18aba8397b593f358f35412d97.tar.bz2
qmmp-c840cac739329c18aba8397b593f358f35412d97.zip
hotkey plugin: fixed bug with capslock
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1132 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/hotkey/hotkeymanager.cpp')
-rw-r--r--src/plugins/General/hotkey/hotkeymanager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/General/hotkey/hotkeymanager.cpp b/src/plugins/General/hotkey/hotkeymanager.cpp
index 712c7871c..ec1fb4350 100644
--- a/src/plugins/General/hotkey/hotkeymanager.cpp
+++ b/src/plugins/General/hotkey/hotkeymanager.cpp
@@ -127,7 +127,7 @@ bool HotkeyManager::eventFilter(QObject* o, QEvent* e)
if (e->type() == QEvent::KeyPress && (o == qApp->desktop () || o == qApp->activeWindow ()))
{
QKeyEvent* k = static_cast<QKeyEvent*>(e);
- quint32 key = k->nativeVirtualKey ();
+ quint32 key = XKeycodeToKeysym(QX11Info::display(), k->nativeScanCode (), 0);
quint32 mod = k->nativeModifiers ();
foreach(Hotkey *hotkey, m_grabbedKeys)
{
@@ -283,3 +283,8 @@ QList<long> HotkeyManager::ignModifiersList()
}
return ret;
}
+
+quint32 HotkeyManager::keycodeToKeysym(quint32 keycode)
+{
+ return XKeycodeToKeysym(QX11Info::display(), keycode, 0);
+}