Better handling of guessed key translations: Uses local shift state.
Fixes problem with LeftShift not working without keymaps. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@164 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
eaaec08277
commit
3b403f9346
10
xkeymap.c
10
xkeymap.c
@ -289,6 +289,15 @@ xkeymap_translate_key(KeySym keysym, unsigned int keycode, unsigned int state)
|
|||||||
if ((keycode >= min_keycode) && (keycode <= 0x60))
|
if ((keycode >= min_keycode) && (keycode <= 0x60))
|
||||||
{
|
{
|
||||||
tr.scancode = keycode - min_keycode;
|
tr.scancode = keycode - min_keycode;
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(stderr, "Sending guessed scancode 0x%x\n", tr.scancode);
|
fprintf(stderr, "Sending guessed scancode 0x%x\n", tr.scancode);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -367,6 +376,7 @@ ensure_remote_modifiers(uint32 ev_time, key_translation tr)
|
|||||||
{
|
{
|
||||||
/* Should not use this modifier. Send up. */
|
/* Should not use this modifier. Send up. */
|
||||||
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LSHIFT);
|
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LSHIFT);
|
||||||
|
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_RSHIFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user