User Tools

Site Tools


wiki:advanced:nx-keyboard-shortcuts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:advanced:nx-keyboard-shortcuts [2013/03/14 23:17]
sunweaver
wiki:advanced:nx-keyboard-shortcuts [2019/05/11 16:33] (current)
uli42 [File Format]
Line 3: Line 3:
 ===== General Remarks ===== ===== General Remarks =====
  
-==== Necessary X2Go Version ==== 
- 
-The feature described below has only recently (as of 2012-12-06) been added to X2go and is currently **experimental**, further testing is necessary. You will need a new nightly build to try it out. 
  
 ==== About this Wiki Page ==== ==== About this Wiki Page ====
  
 This Wiki page is largely a copy of the ''README.keystrokes'' in This Wiki page is largely a copy of the ''README.keystrokes'' in
-[[http://code.x2go.org/gitweb?p=nx-libs.git;a=summary]]. Please keep them in +[[http://code.x2go.org/gitweb?p=nx-libs.git;a=summary]] which in turn is a copy of the same file in NX ([[https://github.com/ArcticaProject/nx-libs/tree/3.6.x/doc/nxagent]]). Please keep them in sync.
-sync.+
  
 ==== About nxagent ==== ==== About nxagent ====
  
-''nxagent'' is the process that an X2Go Server executes. Therefore the configuration described below +''nxagent'' is the process that an X2Go Server executes (under the name ''x2goagenbt''). Therefore the configuration described below 
-is evaluated on an X2Go Server and you have to place your configuration file on the server. +is evaluated on an **X2Go Server** and you have to place your configuration file on the **server**
  
 ===== Configurable Key Bindings in nxagent ===== ===== Configurable Key Bindings in nxagent =====
Line 25: Line 21:
 ===== File Location ===== ===== File Location =====
  
-nxagent searches for the configuration file in the following order:+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/nx/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 ''-keystrokefile'' command line parameter
-  * in the location given by the NXAGENT_KEYSTROKEFILE environment variable +  * in the location given by the ''NXAGENT_KEYSTROKEFILE'' environment variable 
-  * in ~/.nx/config/keystroke.cfg +  * in ''~/.x2go/config/keystrokes.cfg'' 
-  * in /etc/nx/keystroke.cfg+  * in ''/etc/x2go/keystrokes.cfg''
  
-If none of those files is accessible, the default configuration is used which+If none of these files are accessible, the default configuration is used which
 is the same as the old, traditional nxagent keybindings. is the same as the old, traditional nxagent keybindings.
  
-===== File format =====+===== File Format =====
  
 The configuration file is XML with the following format: The configuration file is XML with the following format:
  
-<code xml>+<file xml keystroke.cfg>
 <!DOCTYPE NXKeystroke> <!DOCTYPE NXKeystroke>
 <keystrokes> <keystrokes>
Line 50: Line 54:
 <keystroke action="fullscreen" key="space" Mod1="0" Mod2="0" Control="0" Shift="0" AltMeta="0" /> <keystroke action="fullscreen" key="space" Mod1="0" Mod2="0" Control="0" Shift="0" AltMeta="0" />
 </keystrokes> </keystrokes>
-</code>+</file>
  
-Each ''action'' defines an action to be executed when receiving that keystroke. A +Each 'action' defines an action to be executed when receiving that 
-list of possible actions is given below. Some of those actions are only +keystroke. A list of possible actions is given below. Some of those 
-available with debug builds of nxagent.+actions are only available with debug builds of nxagent.
  
-Keys are given as a combination of ''key'' and (optionally) a number of+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 modifiers. The key attribute is evaluated into a X11 key via the usual
 XStringToKeysym function. A list of possible keys can be found in XStringToKeysym function. A list of possible keys can be found in
-/usr/include/X11/keysymdef.h, the names are specified without the leading +/usr/include/X11/keysymdef.h, the names are specified without the 
-''XK_''. Evaluation is case-sensitive, so, ''space'' and ''Escape'will work while +leading 'XK_'. Evaluation is case-sensitive, so, 'space' and 'Escape' 
-''Space'' and ''escape'' won't.+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 
 +(accompanied by a warning in the session log).  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.
  
-Modifiers are given as boolean attributes, possible modifiers are Mod1, Mod2, +If an attribute occurs more than once in a line the last one wins.
-Mod3, Mod4, 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+Some of the actions can open a dialog windowDepending on the user's 
-Keybindings are evaluated from top to bottom, so if a keybinding matches, other +answer the selected action will be takenSome actions will only show 
-keybindings further down will be ignoredThe contents of the file replaces the +a dialog informing the user about the taken action. All these dialogs 
-default keybindings, and only one file is read, no merging between different +will only work if the nxagent/x2goagent process has a properly 
-configuration files is doneThis also means that an empty or invalid configuration +configured NX_CLIENT environment variable pointing to an executable 
-file deactivates all keybindings.+(like nxdialog) that is responsible for showing the dialogs and taking 
 +the action(s)If that executable cannot be run no dialog will show up 
 +and no action will be taken.
  
 ===== List of possible ''action'' attributes ===== ===== List of possible ''action'' attributes =====
  
   * **close_session**   * **close_session**
-    * This terminates the session+    * This terminates the session.
   * **switch_all_screens**   * **switch_all_screens**
   * **minimize**   * **minimize**
-    * This will minimize the client window (even for fullscreen sessions)+    * This will minimize the client window (even for fullscreen sessions.)
   * **left**   * **left**
   * **up**   * **up**
Line 88: Line 106:
   * **down**   * **down**
   * **resize**   * **resize**
-    * This action switches between the auto-resize and viewport mode (static size). The default is auto-resize. In viewport mode one can use the 'viewport_move_up','viewport_move_down','viewport_move_left' and 'viewport_move_right' actions to move the desktop around.+    * This action switches between the auto-resize and viewport mode (static size). The default is auto-resize. In viewport mode one can use the 'viewport_move_up', 'viewport_move_down', 'viewport_move_left' and 'viewport_move_right' actions to move within the image.
   * **defer**   * **defer**
-    * Works like 'ignore' to make some keys be ignored / defunc inside the session+    * Disables deferred screen updates.
   * **ignore**   * **ignore**
-    * Makes it possible to add 'ignore', as in nothing happens when certain keys are pressed+    * Makes it possible to add 'ignore', as in nothing happens when certain keys are pressed.
   * **fullscreen**   * **fullscreen**
-    * Turns the client window intoor out offullscreen mode.+    * Switches the client window into or out of fullscreen mode.
   * **viewport_move_left**   * **viewport_move_left**
-    * moves the desktop to the left+    * Moves the image viewport to the left.
   * **viewport_move_up**   * **viewport_move_up**
-    * moves the desktop up+    * Moves the image viewport up.
   * **viewport_move_right**   * **viewport_move_right**
-    * moves the desktop to the right+    * Moves the image viewport to the right.
   * **viewport_move_down**   * **viewport_move_down**
-    * moves the desktop down+    * Moves the image viewport down.
  
 Only in builds with certain debugging options enabled, ignored otherwise: Only in builds with certain debugging options enabled, ignored otherwise:
   * **force_synchronization**   * **force_synchronization**
-    * forces the drawing of elements to be synchronized which can fix some visual bugs.+    * Forces the drawing of elements to be synchronized which can fix some visual bugs.
   * **debug_tree**   * **debug_tree**
   * **regions_on_screen**   * **regions_on_screen**
wiki/advanced/nx-keyboard-shortcuts.1363303035.txt.gz · Last modified: 2013/03/14 23:17 by sunweaver