summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-27 20:35:48 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-27 20:35:48 +0200
commitbf10a7c960fec9e13c453fa808741f3a2018474a (patch)
tree9b0c87cad33c76fdcd8f2e6bf1756982ad20371f /plugins
parent7992e5e70e6253fd0a724f7bbe0fcfbcf63555ad (diff)
fixed global hotkeys to work with scroll/num/caps locks
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hotkeys/hotkeys.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c
index e744926d..67024669 100644
--- a/plugins/hotkeys/hotkeys.c
+++ b/plugins/hotkeys/hotkeys.c
@@ -265,6 +265,10 @@ read_config (Display *disp)
// doing it on other thread
for (i = 0; i < command_count; i++) {
XGrabKey (disp, commands[i].keycode, commands[i].modifier, DefaultRootWindow (disp), False, GrabModeAsync, GrabModeAsync);
+ XGrabKey (disp, commands[i].keycode, commands[i].modifier|LockMask, DefaultRootWindow (disp), False, GrabModeAsync, GrabModeAsync);
+ XGrabKey (disp, commands[i].keycode, commands[i].modifier|Mod2Mask, DefaultRootWindow (disp), False, GrabModeAsync, GrabModeAsync);
+ XGrabKey (disp, commands[i].keycode, commands[i].modifier|Mod3Mask, DefaultRootWindow (disp), False, GrabModeAsync, GrabModeAsync);
+ XGrabKey (disp, commands[i].keycode, commands[i].modifier|Mod5Mask, DefaultRootWindow (disp), False, GrabModeAsync, GrabModeAsync);
}
}
@@ -297,6 +301,10 @@ hotkeys_event_loop (void *unused) {
XSetErrorHandler (x_err_handler);
for (int i = 0; i < command_count; i++) {
XUngrabKey (disp, commands[i].keycode, commands[i].modifier, DefaultRootWindow (disp));
+ XUngrabKey (disp, commands[i].keycode, commands[i].modifier|LockMask, DefaultRootWindow (disp));
+ XUngrabKey (disp, commands[i].keycode, commands[i].modifier|Mod2Mask, DefaultRootWindow (disp));
+ XUngrabKey (disp, commands[i].keycode, commands[i].modifier|Mod3Mask, DefaultRootWindow (disp));
+ XUngrabKey (disp, commands[i].keycode, commands[i].modifier|Mod5Mask, DefaultRootWindow (disp));
}
memset (commands, 0, sizeof (commands));
command_count = 0;