From fc05e5e04843762820effb5b5bb145536ddd41f0 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Mon, 10 Oct 2011 17:58:56 +0200 Subject: Imported nxagent-3.3.0-13.tar.gz Summary: Imported nxagent-3.3.0-13.tar.gz Keywords: Imported nxagent-3.3.0-13.tar.gz into Git repository --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.c') 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 } } -- cgit v1.2.3