aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
diff options
context:
space:
mode:
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
}
}