We still had some problems with the shift key getting stuck. The new
code makes sure that we restore "faked" modifiers both after press and release. It's also shorter. I've added two new test cases to the doc as well. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1418 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
02820036e6
commit
9866572002
@ -243,3 +243,17 @@ works:
|
|||||||
11. Press Shift, then press a key modified by shift, the release
|
11. Press Shift, then press a key modified by shift, the release
|
||||||
shift, then release the other key. Do this in a speedy fasion.
|
shift, then release the other key. Do this in a speedy fasion.
|
||||||
Make sure the shift state is not stuck down.
|
Make sure the shift state is not stuck down.
|
||||||
|
|
||||||
|
12. Test all numpad keys, when not using the -N option.
|
||||||
|
|
||||||
|
13. Map a single, un-shifted key (such as F1) to XK_A:
|
||||||
|
xmodmap -e "keycode 67 = A A"
|
||||||
|
|
||||||
|
Perform in Notepad:
|
||||||
|
* Write some text
|
||||||
|
* Press F1
|
||||||
|
* Press b
|
||||||
|
* Release b
|
||||||
|
* Release F1
|
||||||
|
|
||||||
|
Verify that shift is not stuck down, by clicking on the text.
|
||||||
|
24
xkeymap.c
24
xkeymap.c
@ -700,14 +700,6 @@ is_modifier(uint8 scancode)
|
|||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
save_remote_modifiers_if_modifier(uint8 scancode)
|
|
||||||
{
|
|
||||||
if (!is_modifier(scancode))
|
|
||||||
return;
|
|
||||||
|
|
||||||
saved_remote_modifier_state = remote_modifier_state;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint32 ev_time,
|
xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint32 ev_time,
|
||||||
@ -722,18 +714,10 @@ xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint3
|
|||||||
if (tr.scancode == 0)
|
if (tr.scancode == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pressed)
|
save_remote_modifiers(tr.scancode);
|
||||||
{
|
ensure_remote_modifiers(ev_time, tr);
|
||||||
save_remote_modifiers(tr.scancode);
|
rdp_send_scancode(ev_time, pressed ? RDP_KEYPRESS : RDP_KEYRELEASE, tr.scancode);
|
||||||
ensure_remote_modifiers(ev_time, tr);
|
restore_remote_modifiers(ev_time, tr.scancode);
|
||||||
rdp_send_scancode(ev_time, RDP_KEYPRESS, tr.scancode);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rdp_send_scancode(ev_time, RDP_KEYRELEASE, tr.scancode);
|
|
||||||
restore_remote_modifiers(ev_time, tr.scancode);
|
|
||||||
save_remote_modifiers_if_modifier(tr.scancode);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user