aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 8db38892e..e3b58b6c7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -189,7 +189,12 @@ static char *nxagentXkbGetRules(void);
unsigned int nxagentAltMetaMask;
-void nxagentCheckAltMetaKeys(CARD8, int);
+static void nxagentCheckAltMetaKeys(CARD8, int);
+
+CARD8 nxagentCapsLockKeycode = 66;
+CARD8 nxagentNumLockKeycode = 77;
+
+static void nxagentCheckRemoteKeycodes(void);
static CARD8 nxagentConvertedKeycodes[] =
{
@@ -784,6 +789,8 @@ N/A
}
XFreeModifiermap(modifier_keymap);
+ nxagentCheckRemoteKeycodes();
+
keySyms.minKeyCode = min_keycode;
keySyms.maxKeyCode = max_keycode;
keySyms.mapWidth = mapWidth;
@@ -1343,7 +1350,7 @@ int nxagentResetKeyboard(void)
}
}
-void nxagentCheckAltMetaKeys(CARD8 keycode, int j)
+void nxagentCheckAltMetaKeys(CARD8 keycode, int j)
{
if (keycode == XKeysymToKeycode(nxagentDisplay, XK_Meta_L))
{
@@ -1366,6 +1373,19 @@ void nxagentCheckAltMetaKeys(CARD8 keycode, int j)
}
}
+void nxagentCheckRemoteKeycodes()
+{
+ nxagentCapsLockKeycode = XKeysymToKeycode(nxagentDisplay, XK_Caps_Lock);
+
+ nxagentNumLockKeycode = XKeysymToKeycode(nxagentDisplay, XK_Num_Lock);
+
+ #ifdef DEBUG
+ fprintf(stderr, "nxagentCheckRemoteKeycodes: Remote CapsLock keycode "
+ "is [%d] NumLock [%d].\n", nxagentCapsLockKeycode,
+ nxagentNumLockKeycode);
+ #endif
+}
+
static int nxagentSaveKeyboardDeviceData(DeviceIntPtr dev, DeviceIntPtr devBackup)
{
if (devBackup == NULL)