aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:56 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:56 +0200
commitfc05e5e04843762820effb5b5bb145536ddd41f0 (patch)
tree724ccf58b487c4c48f48a0b052db656300535abf /nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
parent1a74e03235ced7003989b8c02bc4d955234431c1 (diff)
downloadnx-libs-fc05e5e04843762820effb5b5bb145536ddd41f0.tar.gz
nx-libs-fc05e5e04843762820effb5b5bb145536ddd41f0.tar.bz2
nx-libs-fc05e5e04843762820effb5b5bb145536ddd41f0.zip
Imported nxagent-3.3.0-13.tar.gznxagent/3.3.0-13
Summary: Imported nxagent-3.3.0-13.tar.gz Keywords: Imported nxagent-3.3.0-13.tar.gz into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
index ea06913f8..762ab79dc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
@@ -31,6 +31,12 @@
extern Bool nxagentWMIsRunning;
extern Bool nxagentIpaq;
+#ifdef NX_DEBUG_INPUT
+int nxagentDebugInputDevices = 0;
+unsigned long nxagentLastInputDevicesDumpTime = 0;
+extern void nxagentDeactivateInputDevicesGrabs();
+#endif
+
/*
* Set here the required log level.
*/
@@ -209,6 +215,53 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
}
#endif
+
+ #ifdef NX_DEBUG_INPUT
+
+ case XK_X:
+ case XK_x:
+ {
+ /*
+ * Used to test the input devices state.
+ */
+
+ if (X -> type == KeyPress)
+ {
+ if (nxagentDebugInputDevices == 0)
+ {
+ fprintf(stderr, "Info: Turning input devices debug ON.\n");
+
+ nxagentDebugInputDevices = 1;
+ }
+ else
+ {
+ fprintf(stderr, "Info: Turning input devices debug OFF.\n");
+
+ nxagentDebugInputDevices = 0;
+
+ nxagentLastInputDevicesDumpTime = 0;
+ }
+ }
+
+ return 1;
+ }
+
+ case XK_Y:
+ case XK_y:
+ {
+ /*
+ * Used to deactivate input devices grab.
+ */
+
+ if (X -> type == KeyPress)
+ {
+ nxagentDeactivateInputDevicesGrabs();
+ }
+
+ return 1;
+ }
+
+ #endif
}
}