diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-12-28 18:46:39 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-12-28 18:46:39 +0100 |
commit | c29053f82cbea5f2704d99c4d5e8afe0329e5cbe (patch) | |
tree | 37f025269eb5df59a49c3b6971090f8c89b089bd /nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | |
parent | e01b9177b41f7d27a934d41fa38d550fa0026b45 (diff) | |
download | nx-libs-c29053f82cbea5f2704d99c4d5e8afe0329e5cbe.tar.gz nx-libs-c29053f82cbea5f2704d99c4d5e8afe0329e5cbe.tar.bz2 nx-libs-c29053f82cbea5f2704d99c4d5e8afe0329e5cbe.zip |
Imported nxagent-3.5.0-7.tar.gznxagent/3.5.0-7
Summary: Imported nxagent-3.5.0-7.tar.gz
Keywords:
Imported nxagent-3.5.0-7.tar.gz
into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 24 |
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) |