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
2b0976e9
Unverified
Commit
2b0976e9
authored
Oct 17, 2020
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/fix_caps_handling' into 3.6.x
Attributes GH PR #937:
https://github.com/ArcticaProject/nx-libs/pull/937
parents
05cb09a5
ffc2c384
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
Keyboard.c
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+44
-2
No files found.
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
View file @
2b0976e9
...
...
@@ -706,12 +706,54 @@ XkbError:
{
XkbGetControls
(
nxagentDisplay
,
XkbAllControlsMask
,
xkb
);
}
#ifdef TEST
#ifdef TEST
else
{
fprintf
(
stderr
,
"%s: No current keyboard.
\n
"
,
__func__
);
}
#endif
#endif
#ifdef TEST
if
(
nxagentCapsLockKeycode
!=
0
)
{
fprintf
(
stderr
,
"%s: Modifiers for CapsLock (%d): 0x%x
\n
"
,
__func__
,
nxagentCapsLockKeycode
,
xkb
->
map
->
modmap
[
nxagentCapsLockKeycode
]);
}
if
(
nxagentNumLockKeycode
!=
0
)
{
fprintf
(
stderr
,
"%s: Modifiers for NumLock (%d): 0x%x
\n
"
,
__func__
,
nxagentNumLockKeycode
,
xkb
->
map
->
modmap
[
nxagentNumLockKeycode
]);
}
#endif
/* Users can add options to their xkb setup. E.g. setxkbmap
* -option caps:ctrl_modifier makes CapsLock behave like the
* Ctrl key. As we have special treatment for CapsLock and
* NumLock to keep them in sync with the real X server we
* check if they are assigned to another modifier. In that
* case we disable the sync treatment by setting the according
* keycode to 0.
*/
if
(
xkb
&&
xkb
->
map
&&
xkb
->
map
->
modmap
)
{
if
(
nxagentCapsLockKeycode
!=
0
&&
xkb
->
map
->
modmap
[
nxagentCapsLockKeycode
]
!=
LockMask
)
{
nxagentCapsLockKeycode
=
0
;
#ifdef TEST
fprintf
(
stderr
,
"%s: CapsLock key is mapped to some other modifier - disabling special treatment
\n
"
,
__func__
);
#endif
}
/* I have not found an xkb option definition for remapping
* NumLock. But users can still do that manually so let's be
* safe here.
*/
if
(
xkb
->
map
->
modmap
[
nxagentNumLockKeycode
]
!=
Mod2Mask
)
{
nxagentNumLockKeycode
=
0
;
#ifdef TEST
fprintf
(
stderr
,
"%s: Numock key is mapped to some other modifier - disabling special treatment
\n
"
,
__func__
);
#endif
}
}
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Going to set rules and init device: "
...
...
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