diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-12-28 18:48:50 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-12-28 18:48:50 +0100 |
commit | 82ab807fd5397aa152dd7369a36beccbacb962cb (patch) | |
tree | 1f03b72ac7d497b8cd9ca5094615136edffd257c /nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | |
parent | aa166550657f3a928f5d7a8babc0956b69f4a587 (diff) | |
parent | c29053f82cbea5f2704d99c4d5e8afe0329e5cbe (diff) | |
download | nx-libs-82ab807fd5397aa152dd7369a36beccbacb962cb.tar.gz nx-libs-82ab807fd5397aa152dd7369a36beccbacb962cb.tar.bz2 nx-libs-82ab807fd5397aa152dd7369a36beccbacb962cb.zip |
Merge branch 'nxagent'
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) |