diff options
Diffstat (limited to 'xutil.cpp')
-rw-r--r-- | xutil.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |