From dd3ee3821fb6ebab9d1b0858e357ad110822d7e1 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 18 Apr 2019 15:55:48 +0200 Subject: Add caps lock warning --- src/x11util.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/x11util.cpp') 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 #include + #include } #include #include @@ -62,3 +63,11 @@ cleanup: XCloseDisplay(dpy); } } + +extern "C" +unsigned int getKeyMask(Display *dpy) +{ + unsigned int n = 0; + XkbGetIndicatorState(dpy, XkbUseCoreKbd, &n); + return n; +} -- cgit v1.2.3-55-g7522