diff options
author | Alexander Wuerstlein <arw@arw.name> | 2015-02-13 09:52:21 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-13 09:52:21 +0100 |
commit | e91277d02bf1288909daed3b0de8f876f6403acf (patch) | |
tree | 527aa5a009cd50e66767af09703818616328c50c /nx-X11/programs/Xserver/hw/nxagent/Args.c | |
parent | 4dc1bd0043aed6b92526cbda26991be1f611a121 (diff) | |
download | nx-libs-e91277d02bf1288909daed3b0de8f876f6403acf.tar.gz nx-libs-e91277d02bf1288909daed3b0de8f876f6403acf.tar.bz2 nx-libs-e91277d02bf1288909daed3b0de8f876f6403acf.zip |
Make nxagent-specific keyboard bindings configurable (320_nxagent_configurable-keystrokes.full.patch).
Replaces the hardcoded nxagent keybindings by a configurable
table of keybindings. The default configuration is the same as the
original one, to maintain compatibility. A user/administrator can either
specify a command line parameter, environment variable or place a file
in ~/.nx/config/keystrokes.cfg or /etc/nxagent/keystrokes.cfg to reconfigure
these keybindings.
The configuration file format is XML, a dependency on libxml2 is added
to allow parsing the configuration.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Args.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 7074a1818..07e967065 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -149,6 +149,8 @@ static int nxagentGetDialogName(void); char nxagentVerbose = 0; +char *nxagentKeystrokeFile = NULL; + int ddxProcessArgument(int argc, char *argv[], int i) { /* @@ -1022,6 +1024,20 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (!strcmp(argv[i], "-keystrokefile")) + { + if (i + 1 < argc) + { + if (NULL != (nxagentKeystrokeFile = strdup(argv[i + 1]))) + { + return 2; + } else { + FatalError("malloc failed"); + } + } + return 0; + } + return 0; } |