summaryrefslogtreecommitdiff
path: root/xutil.cpp
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2024-02-01 14:09:26 +0100
committerTom Smeding <t.j.smeding@uu.nl>2024-02-01 14:28:15 +0100
commit119b623640254f425a89a3f13ce5cbe633ead9c2 (patch)
tree348f17181e5afb6bebc8a68db34de9d214ffd431 /xutil.cpp
parenta4f291dcfdbbb17f59679fbe0f010062a4cd49e5 (diff)
Support for keycode inputHEADmaster
Diffstat (limited to 'xutil.cpp')
-rw-r--r--xutil.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/xutil.cpp b/xutil.cpp
index 7adceaa..2651dba 100644
--- a/xutil.cpp
+++ b/xutil.cpp
@@ -49,8 +49,11 @@ namespace x {
}
void globalKeyWatch(Display *dpy, Keysym keysym, std::function<bool(const XKeyEvent&)> callback) {
+ globalKeyWatch(dpy, keysym.toCode(dpy), callback);
+ }
+
+ void globalKeyWatch(Display *dpy, Keycode keycode, std::function<bool(const XKeyEvent&)> callback) {
const Window root = DefaultRootWindow(dpy);
- const Keycode keycode = keysym.toCode(dpy);
auto guard = XGrabKeyRAII(dpy, keycode, AnyModifier, root);