aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/hotkey/hotkeymanager.cpp
diff options
context:
space:
mode:
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);
+}