--- sourceforge.net/trunk/rdesktop/xkeymap.c 2002/07/23 01:53:04 67 +++ sourceforge.net/trunk/rdesktop/xkeymap.c 2002/07/27 22:35:38 69 @@ -163,6 +163,11 @@ MASK_ADD_BITS(modifiers, MapNumLockMask); } + if (strstr(line_rest, "localstate")) + { + MASK_ADD_BITS(modifiers, MapLocalStateMask); + } + add_to_keymap(keyname, scancode, modifiers, mapname); if (strstr(line_rest, "addupper")) @@ -211,12 +216,22 @@ key_translation -xkeymap_translate_key(KeySym keysym, unsigned int keycode) +xkeymap_translate_key(KeySym keysym, unsigned int keycode, unsigned int state) { key_translation tr = { 0, 0 }; tr = keymap[keysym & KEYMAP_MASK]; + if (tr.modifiers & MapLocalStateMask) + { + /* The modifiers to send for this key should be obtained + from the local state. Currently, only shift is implemented. */ + if (state & ShiftMask) + { + tr.modifiers = MapLeftShiftMask; + } + } + if (tr.scancode != 0) { DEBUG_KBD