1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
Configurable keybindings in nxagent
Keybindings in the redistributed x2go version of nxagent can be configured
by the user. This is done via a configuration file.
File location
-------------
nxagent parses the first available configuration file and ignores all others.
If nxagent is called without branding, it searches:
- in the location given by the '-keystrokefile' command line parameter
- in the location given by the NXAGENT_KEYSTROKEFILE environment variable
- in ~/.nx/config/keystrokes.cfg
- in /etc/nxagent/keystrokes.cfg
If nxagent is called with X2Go branding (i.e., as x2goagent), it searches:
- in the location given by the '-keystrokefile' command line parameter
- in the location given by the X2GO_KEYSTROKEFILE environment variable
- in ~/.x2go/config/keystrokes.cfg
- in /etc/x2go/keystrokes.cfg
If none of these files are accessible, the default configuration is used which
is the same as the old, traditional nxagent keybindings.
File format
-----------
The configuration file is XML with the following format:
<!DOCTYPE NXKeystroke>
<keystrokes>
<keystroke action="fullscreen" AltMeta="1" Control="1" key="b" />
<keystroke action="minimize" AltMeta="1" Control="1" key="space" />
<keystroke action="minimize" key="Escape" Shift="1" />
<keystroke action="close_session" key="F7" />
<keystroke action="fullscreen" key="F7" Mod1="1" />
<keystroke action="fullscreen" key="F6" Mod1="1" />
<keystroke action="force_synchronization" key="f" />
<keystroke action="fullscreen" key="space" Mod1="0" Mod2="0" Control="0" Shift="0" AltMeta="0" />
</keystrokes>
Each 'action' defines an action to be executed when receiving that
keystroke. A list of possible actions is given below. Some of those
actions are only available with debug builds of nxagent.
Keys are given as a combination of 'key' and (optionally) a number of
modifiers. The key attribute is evaluated into a X11 key via the usual
XStringToKeysym function. A list of possible keys can be found in
/usr/include/X11/keysymdef.h, the names are specified without the
leading 'XK_'. Evaluation is case-sensitive, so, 'space' and 'Escape'
will work while 'Space' and 'escape' won't.
Modifiers are given as boolean attributes, possible modifiers are
Mod1, Mod2, Mod3, Mod4, Mod5, Control, Shift, Lock. Sensible
combinations strongly depend on your keyboard configuration, but
usually you will need Mod1 and Control. Boolean in this context means
'0', 'false' and an unspecified attribute are false, anything else is
considered true.
Everything in this file is case-sensitive. Unknown lines are ignored.
Keybindings are evaluated from top to bottom, so if a keybinding
matches, other keybindings further down will be ignored. The contents
of the file replaces the default keybindings, and only one file is
read, no merging between different configuration files is done. This
also means that an empty or invalid configuration file deactivates all
keybindings.
If an attribute occurs more than once in a line the last one wins.
List of possible 'action' attributes:
-------------------------------------
close_session
This terminates the session.
fullscreen
Switches the client window into or out of fullscreen mode, using
only the current head.
switch_all_screens
Switches the client window into or out of fullscreen mode, using all
available heads.
minimize
This will minimize the client window (even for fullscreen sessions).
resize
This action switches between the auto-resize (default) and viewport
mode. In viewport mode the xserver screen size stays static even
if the nxagent window is resized. You will possibly only see a part of
the screen and can scroll around using the following actions:
viewport_move_up/down
Moves the viewport up/down by the height of the visiable area.
viewport_move_left/right
Moves the viewport left/right by the width of the visible area.
up/down/left/right
Smoothly moves the viewport up/down/left/right with increasing step
size (maximum step size is 200px).
defer
Activates/deactivates deferred screen updates.
ignore
Ignores the following keystroke, nothing will happen when this
keystroke is pressed.
reread_keystrokes
Forces nxagent to re-read the keystroke configuration. Useful to
add/change keystrokes to a running session.
force_synchronization
Forces immediate drawing of elements to be synchronized which can
fix some visual bugs.
|