aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-19 22:24:59 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-19 22:24:59 +0100
commitb7c389b9a0fa366a40ab272a9429a52ecee7365d (patch)
tree065ae9f127d6091ea37424f560dc8cbf47d59cc4 /nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
parent7fd5d934c1e73642e9919aa8dd5124466356fb89 (diff)
parent7065e0bf25484fe9cf008c934b69eff90600d3d8 (diff)
downloadnx-libs-b7c389b9a0fa366a40ab272a9429a52ecee7365d.tar.gz
nx-libs-b7c389b9a0fa366a40ab272a9429a52ecee7365d.tar.bz2
nx-libs-b7c389b9a0fa366a40ab272a9429a52ecee7365d.zip
Merge branch 'uli42-pr/ignore_caps' into 3.6.x
Attributes GH PR #398: https://github.com/ArcticaProject/nx-libs/pull/398
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 5fc01c976..02b60bef4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -204,8 +204,10 @@ static char *nxagentXkbGetRules(void);
unsigned int nxagentAltMetaMask;
unsigned int nxagentAltMask;
unsigned int nxagentMetaMask;
+unsigned int nxagentCapsMask;
+unsigned int nxagentNumlockMask;
-static void nxagentCheckAltMetaKeys(CARD8, int);
+static void nxagentCheckModifierMasks(CARD8, int);
CARD8 nxagentCapsLockKeycode = 66;
CARD8 nxagentNumLockKeycode = 77;
@@ -792,6 +794,8 @@ N/A
nxagentAltMetaMask = 0;
nxagentAltMask = 0;
nxagentMetaMask = 0;
+ nxagentCapsMask = 0;
+ nxagentNumlockMask = 0;
for (i = 0; i < 256; i++)
modmap[i] = 0;
@@ -805,7 +809,7 @@ N/A
if (keycode > 0)
{
- nxagentCheckAltMetaKeys(keycode, j);
+ nxagentCheckModifierMasks(keycode, j);
}
}
XFreeModifiermap(modifier_keymap);
@@ -1377,7 +1381,7 @@ int nxagentResetKeyboard(void)
}
}
-void nxagentCheckAltMetaKeys(CARD8 keycode, int j)
+void nxagentCheckModifierMasks(CARD8 keycode, int j)
{
if (keycode == XKeysymToKeycode(nxagentDisplay, XK_Meta_L))
{
@@ -1402,6 +1406,18 @@ void nxagentCheckAltMetaKeys(CARD8 keycode, int j)
nxagentAltMetaMask |= 1 << j;
nxagentAltMask |= 1 << j;
}
+
+ if (keycode == XKeysymToKeycode(nxagentDisplay, XK_Num_Lock))
+ {
+ nxagentNumlockMask |= 1 << j;
+ }
+
+ if (keycode == XKeysymToKeycode(nxagentDisplay, XK_Caps_Lock) ||
+ keycode == XKeysymToKeycode(nxagentDisplay, XK_Shift_Lock) )
+ {
+ nxagentCapsMask |= 1 << j;
+ }
+
}
void nxagentCheckRemoteKeycodes()