aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c19
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.h13
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/man/nxagent.113
5 files changed, 67 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index ea970be02..cccfd40e0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -1483,6 +1483,25 @@ static void nxagentParseOptions(char *name, char *value)
return;
}
+ else if (!strcmp(name, "keyconv"))
+ {
+ if (!strcmp(value, "off")) {
+ nxagentChangeOption(KeycodeConversion, KeycodeConversionOff);
+ }
+ else if (!strcmp(value, "on")) {
+ nxagentChangeOption(KeycodeConversion, KeycodeConversionOn);
+ }
+ else if (!strcmp(value, "auto")) {
+ nxagentChangeOption(KeycodeConversion, KeycodeConversionAuto);
+ }
+ else
+ {
+ fprintf(stderr, "Warning: Ignoring bad value '%s' for option 'keyconv'.\n",
+ validateString(value));
+ }
+
+ return;
+ }
else
{
#ifdef DEBUG
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 06977d99d..e92df8762 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -1821,6 +1821,19 @@ void nxagentKeycodeConversionSetup(void)
char *doptions = NULL;
unsigned int drulesLen;
+ if (nxagentOption(KeycodeConversion) == KeycodeConversionOff)
+ {
+ fprintf(stderr, "Info: Keycode conversion is off\n");
+ nxagentKeycodeConversion = False;
+ return;
+ }
+ else if (nxagentOption(KeycodeConversion) == KeycodeConversionOn)
+ {
+ fprintf(stderr, "Info: Keycode conversion is on\n");
+ nxagentKeycodeConversion = True;
+ return;
+ }
+
nxagentKeycodeConversion = False;
drulesLen = nxagentXkbGetNames(&drules, &dmodel, &dlayout,
@@ -1894,8 +1907,13 @@ void nxagentKeycodeConversionSetup(void)
"Activating KeyCode conversion.\n");
#endif
+ fprintf(stderr, "Info: Keycode conversion auto-determined as on\n");
nxagentKeycodeConversion = True;
}
+ else
+ {
+ fprintf(stderr, "Info: Keycode conversion auto-determined as off\n");
+ }
if (drules != NULL)
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c
index 978f3ab95..3464fdb10 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c
@@ -168,6 +168,8 @@ void nxagentInitOptions()
nxagentOptions.SleepTime = DEFAULT_SLEEP_TIME;
nxagentOptions.ReconnectTolerance = DEFAULT_TOLERANCE;
+
+ nxagentOptions.KeycodeConversion = DEFAULT_KEYCODE_CONVERSION;
}
/*
@@ -193,6 +195,8 @@ void nxagentResetOptions()
nxagentOptions.WMBorderWidth = -1;
nxagentOptions.WMTitleHeight = -1;
+
+ nxagentOptions.KeycodeConversion = DEFAULT_KEYCODE_CONVERSION;
}
void nxagentSaveOptions()
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h
index 20616a90b..95b0642e1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h
@@ -78,6 +78,15 @@ typedef enum _ToleranceChecksMode
#define DEFAULT_TOLERANCE ToleranceChecksStrict
+typedef enum _KeycodeConversion
+{
+ KeycodeConversionOn = 0,
+ KeycodeConversionOff = 1,
+ KeycodeConversionAuto = 2
+} KeycodeConversionMode;
+
+#define DEFAULT_KEYCODE_CONVERSION KeycodeConversionAuto
+
/*
* Set of options affecting agent operations.
*/
@@ -431,6 +440,10 @@ typedef struct _AgentOptions
ToleranceChecksMode ReconnectTolerance;
+ /*
+ * Convert evdev keycodes to pc105.
+ */
+ KeycodeConversionMode KeycodeConversion;
} AgentOptionsRec;
typedef AgentOptionsRec *AgentOptionsPtr;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
index 43b3381d5..e5393c71e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
+++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
@@ -491,6 +491,19 @@ start or resume a session in fullscreen mode (default: off)
.B keyboard=<string>
set remote keyboard layout
.TP 8
+.B keyconv=<string>
+set keycode conversion mode
+
+.BR auto | on | off
+
+by default (\fIauto\fR) \fBnxagent\fR will activate keycode conversion
+if it detects an evdev XKEYBOARD setup on the client side (the
+standard on linux systems nowadays). Keycode conversion means that
+certain keycodes are mapped to make the keyboard appear as an pc105
+model. Using \fIoff\fR this conversion can be suppressed and with
+\fIon\fR it will be forced.
+
+.TP 8
.B clipboard=<string>
.BR both | client | server | none