From 4adb1911ff60abfb8c61b1677c2c225c54f156f1 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 23 Mar 2017 22:18:16 +0100 Subject: Keystroke.h/Keyboard.h: cleanup mask variables --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index 48ed65b35..f8b4feb2f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -30,8 +30,6 @@ extern Bool nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*); -unsigned int nxagentAltMetaMask; - /* keep this sorted, do not rely on any numerical value in this enum, and be aware * that KEYSTROKE_MAX may be used in a malloc */ -- cgit v1.2.3 From 811ce4902ca7c3ab4b848d01695081d2def11763 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 23 Mar 2017 22:21:00 +0100 Subject: Keystroke.h: auto-enum keystrokes there's no need to define the values ourselves --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 51 +++++++++++++------------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index f8b4feb2f..f8602fc37 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -37,39 +37,38 @@ extern Bool nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*); * Keystroke.c nxagentSpecialKeystrokeNames */ enum nxagentSpecialKeystroke { /* 0 is used as end marker */ - KEYSTROKE_END_MARKER = 0, - KEYSTROKE_CLOSE_SESSION = 1, - KEYSTROKE_SWITCH_ALL_SCREENS = 2, - KEYSTROKE_FULLSCREEN = 3, - KEYSTROKE_MINIMIZE = 4, - KEYSTROKE_LEFT = 5, - KEYSTROKE_UP = 6, - KEYSTROKE_RIGHT = 7, - KEYSTROKE_DOWN = 8, - KEYSTROKE_RESIZE = 9, - KEYSTROKE_DEFER = 10, - KEYSTROKE_IGNORE = 11, - KEYSTROKE_FORCE_SYNCHRONIZATION = 12, + KEYSTROKE_END_MARKER, + KEYSTROKE_CLOSE_SESSION, + KEYSTROKE_SWITCH_ALL_SCREENS, + KEYSTROKE_FULLSCREEN, + KEYSTROKE_MINIMIZE, + KEYSTROKE_LEFT, + KEYSTROKE_UP, + KEYSTROKE_RIGHT, + KEYSTROKE_DOWN, + KEYSTROKE_RESIZE, + KEYSTROKE_DEFER, + KEYSTROKE_IGNORE, + KEYSTROKE_FORCE_SYNCHRONIZATION, /* stuff used for debugging, probably not useful for most people */ - KEYSTROKE_DEBUG_TREE = 13, - KEYSTROKE_REGIONS_ON_SCREEN = 14, - KEYSTROKE_TEST_INPUT = 15, - KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB = 16, + KEYSTROKE_DEBUG_TREE, + KEYSTROKE_REGIONS_ON_SCREEN, + KEYSTROKE_TEST_INPUT, + KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, - KEYSTROKE_VIEWPORT_MOVE_LEFT = 17, - KEYSTROKE_VIEWPORT_MOVE_UP = 18, - KEYSTROKE_VIEWPORT_MOVE_RIGHT = 19, - KEYSTROKE_VIEWPORT_MOVE_DOWN = 20, + KEYSTROKE_VIEWPORT_MOVE_LEFT, + KEYSTROKE_VIEWPORT_MOVE_UP, + KEYSTROKE_VIEWPORT_MOVE_RIGHT, + KEYSTROKE_VIEWPORT_MOVE_DOWN, - KEYSTROKE_REREAD_KEYSTROKES = 21, + KEYSTROKE_REREAD_KEYSTROKES, - KEYSTROKE_NOTHING = 22, + KEYSTROKE_NOTHING, - /* insert more here, increment KEYSTROKE_MAX accordingly. - * then update string translation below */ + /* insert more here and in the string translation */ - KEYSTROKE_MAX = 23, + KEYSTROKE_MAX, }; struct nxagentSpecialKeystrokeMap { -- cgit v1.2.3 From 3c921ccb42601ad78d0e6a67318ad12ed7118889 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 23 Mar 2017 22:22:05 +0100 Subject: Keystroke.c/h: completely disable keystrokes that are not active at compile time --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index f8602fc37..caf72f78c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -52,10 +52,16 @@ enum nxagentSpecialKeystroke { KEYSTROKE_FORCE_SYNCHRONIZATION, /* stuff used for debugging, probably not useful for most people */ +#ifdef DEBUG_TREE KEYSTROKE_DEBUG_TREE, +#endif +#ifdef DUMP KEYSTROKE_REGIONS_ON_SCREEN, +#endif +#ifdef NX_DEBUG_INPUT KEYSTROKE_TEST_INPUT, KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, +#endif KEYSTROKE_VIEWPORT_MOVE_LEFT, KEYSTROKE_VIEWPORT_MOVE_UP, -- cgit v1.2.3 From 79520f9c614d40f0e7d92a43241b1043ef240f5d Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 23 Mar 2017 22:46:35 +0100 Subject: Keystroke.c: introduce nxagentDumpKeystrokes() --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 1 + 1 file changed, 1 insertion(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index caf72f78c..777540aa0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -29,6 +29,7 @@ #include "Events.h" extern Bool nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*); +extern void nxagentDumpKeystrokes(void); /* keep this sorted, do not rely on any numerical value in this enum, and be aware * that KEYSTROKE_MAX may be used in a malloc */ -- cgit v1.2.3 From ba5183f80836042ce90be7dde29cc2c5f13baf9d Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 23 Mar 2017 23:11:32 +0100 Subject: Init keystrokes at startup and reconnect no more late initialization --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 1 + 1 file changed, 1 insertion(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index 777540aa0..7eb71bb6f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -30,6 +30,7 @@ extern Bool nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*); extern void nxagentDumpKeystrokes(void); +extern void nxagentInitKeystrokes(Bool force); /* keep this sorted, do not rely on any numerical value in this enum, and be aware * that KEYSTROKE_MAX may be used in a malloc */ -- cgit v1.2.3 From ee18cd43d873bc814ca40faabd29cc486061969f Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 27 Mar 2017 22:58:38 +0200 Subject: Keystrokes: rename left/up/right/down keystrokes to descriptive names The are now called reflecting their purpose: viewport_scroll_left/up/right/down. This also regroups all the keystrokes referring to viewport stuff. --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index 7eb71bb6f..13a83d0fe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -44,11 +44,6 @@ enum nxagentSpecialKeystroke { KEYSTROKE_SWITCH_ALL_SCREENS, KEYSTROKE_FULLSCREEN, KEYSTROKE_MINIMIZE, - KEYSTROKE_LEFT, - KEYSTROKE_UP, - KEYSTROKE_RIGHT, - KEYSTROKE_DOWN, - KEYSTROKE_RESIZE, KEYSTROKE_DEFER, KEYSTROKE_IGNORE, KEYSTROKE_FORCE_SYNCHRONIZATION, @@ -65,10 +60,16 @@ enum nxagentSpecialKeystroke { KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, #endif + /* all the viewport stuff */ + KEYSTROKE_RESIZE, KEYSTROKE_VIEWPORT_MOVE_LEFT, KEYSTROKE_VIEWPORT_MOVE_UP, KEYSTROKE_VIEWPORT_MOVE_RIGHT, KEYSTROKE_VIEWPORT_MOVE_DOWN, + KEYSTROKE_VIEWPORT_SCROLL_LEFT, + KEYSTROKE_VIEWPORT_SCROLL_UP, + KEYSTROKE_VIEWPORT_SCROLL_RIGHT, + KEYSTROKE_VIEWPORT_SCROLL_DOWN, KEYSTROKE_REREAD_KEYSTROKES, -- cgit v1.2.3