Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
7f777e01
Unverified
Commit
7f777e01
authored
Nov 26, 2017
by
Mihai Moldovan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/nokeyconv' into 3.6.x
Attributes GH PR #556:
https://github.com/ArcticaProject/nx-libs/pull/556
parents
2e724702
66046f13
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
5 deletions
+72
-5
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+19
-0
Keyboard.c
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+23
-5
Options.c
nx-X11/programs/Xserver/hw/nxagent/Options.c
+4
-0
Options.h
nx-X11/programs/Xserver/hw/nxagent/Options.h
+13
-0
nxagent.1
nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
+13
-0
No files found.
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
7f777e01
...
...
@@ -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
...
...
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
View file @
7f777e01
...
...
@@ -475,11 +475,11 @@ static CARD8 nxagentConvertedKeycodes[] =
/* 255 */
255
};
static
int
nxagentKeycodeConversion
=
0
;
static
Bool
nxagentKeycodeConversion
=
False
;
CARD8
nxagentConvertKeycode
(
CARD8
k
)
{
if
(
nxagentKeycodeConversion
!=
0
)
if
(
nxagentKeycodeConversion
)
{
#ifdef DEBUG
if
(
k
!=
nxagentConvertedKeycodes
[
k
])
...
...
@@ -1821,7 +1821,20 @@ void nxagentKeycodeConversionSetup(void)
char
*
doptions
=
NULL
;
unsigned
int
drulesLen
;
nxagentKeycodeConversion
=
0
;
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
,
&
dvariant
,
&
doptions
);
...
...
@@ -1894,7 +1907,12 @@ void nxagentKeycodeConversionSetup(void)
"Activating KeyCode conversion.
\n
"
);
#endif
nxagentKeycodeConversion
=
1
;
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
)
...
...
@@ -1923,7 +1941,7 @@ void nxagentResetKeycodeConversion(void)
"WARNING! Failed to query XKB extension.
\n
"
);
#endif
nxagentKeycodeConversion
=
0
;
nxagentKeycodeConversion
=
False
;
}
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.c
View file @
7f777e01
...
...
@@ -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
()
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.h
View file @
7f777e01
...
...
@@ -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
;
...
...
nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
View file @
7f777e01
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment