+
+
+void screen::grabModifiers() const {
+ Display *display = _epist->getXDisplay();
+
+ XGrabKeyboard(display, rootWindow(), True, GrabModeAsync,
+ GrabModeAsync, CurrentTime);
+}
+
+
+void screen::ungrabModifiers() const {
+ Display *display = _epist->getXDisplay();
+
+ XUngrabKeyboard(display, CurrentTime);
+}
+
+
+bool screen::nothingIsPressed(void) const
+{
+ char keys[32];
+ XQueryKeymap(_epist->getXDisplay(), keys);
+
+ for (int i = 0; i < 32; ++i) {
+ if (keys[i] != 0)
+ return false;
+ }
+
+ return true;
+}