diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:58:57 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:58:57 +0200 |
commit | e9132da09462b3d2607a97e2f580cbd3144819eb (patch) | |
tree | 2dfc6a37f2be48a8e61f37d62565e83be4b73186 /nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | |
parent | 6f5e20bc49695159bd3b313333591c4eb27ad422 (diff) | |
download | nx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.tar.gz nx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.tar.bz2 nx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.zip |
Imported nxagent-3.4.0-11.tar.gznxagent/3.4.0-11
Summary: Imported nxagent-3.4.0-11.tar.gz
Keywords:
Imported nxagent-3.4.0-11.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.c | 121 |
1 files changed, 119 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index ea06913f8..de1da8654 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -1,6 +1,6 @@ /**************************************************************************/ /* */ -/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */ +/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* */ /* NXAGENT, NX protocol compression and NX extensions to this software */ /* are copyright of NoMachine. Redistribution and use of the present */ @@ -9,7 +9,7 @@ /* */ /* Check http://www.nomachine.com/licensing.html for applicability. */ /* */ -/* NX and NoMachine are trademarks of NoMachine S.r.l. */ +/* NX and NoMachine are trademarks of Medialogic S.p.A. */ /* */ /* All rights reserved. */ /* */ @@ -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. */ @@ -86,6 +92,18 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) { switch (sym) { + #ifdef DEBUG_TREE + + case XK_q: + case XK_Q: + { + *result = doDebugTree; + + break; + } + + #endif /* DEBUG_TREE */ + case XK_t: case XK_T: { @@ -209,6 +227,105 @@ 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 + } + } + else if ((X -> state & nxagentAltMetaMask) && + ((X -> state & (ControlMask | ShiftMask)) == (ControlMask | + ShiftMask))) + { + switch (sym) + { + case XK_Left: + case XK_KP_Left: + { + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) + { + *result = doViewportMoveLeft; + } + + break; + } + case XK_Up: + case XK_KP_Up: + { + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) + { + *result = doViewportMoveUp; + } + + break; + } + case XK_Right: + case XK_KP_Right: + { + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) + { + *result = doViewportMoveRight; + } + + break; + } + case XK_Down: + case XK_KP_Down: + { + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) + { + *result = doViewportMoveDown; + } + + break; + } } } |