diff options
Diffstat (limited to 'src/x11util.cpp')
-rw-r--r-- | src/x11util.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/x11util.cpp b/src/x11util.cpp index 67dae90..c401b4f 100644 --- a/src/x11util.cpp +++ b/src/x11util.cpp @@ -2,6 +2,7 @@ extern "C" { #include <X11/Xlib.h> #include <X11/Xutil.h> + #include <X11/XKBlib.h> } #include <cstring> #include <cstdlib> @@ -62,3 +63,11 @@ cleanup: XCloseDisplay(dpy); } } + +extern "C" +unsigned int getKeyMask(Display *dpy) +{ + unsigned int n = 0; + XkbGetIndicatorState(dpy, XkbUseCoreKbd, &n); + return n; +} |