Automatically release and re-press any active modifier keys before sending Alt-codes.
This commit is contained in:
parent
b9a1652049
commit
f278bacfa0
@ -236,6 +236,9 @@ void __guac_rdp_send_altcode(guac_client* client, const char* altcode) {
|
|||||||
/* Lookup scancode for Alt */
|
/* Lookup scancode for Alt */
|
||||||
int alt = GUAC_RDP_KEYSYM_LOOKUP(*keysym_scancodes, 0xFFE9 /* Alt_L */).scancode;
|
int alt = GUAC_RDP_KEYSYM_LOOKUP(*keysym_scancodes, 0xFFE9 /* Alt_L */).scancode;
|
||||||
|
|
||||||
|
/* Release all pressed modifiers */
|
||||||
|
__guac_rdp_update_keysyms(client, GUAC_KEYSYMS_ALL_MODIFIERS, 1, 0);
|
||||||
|
|
||||||
/* Press Alt */
|
/* Press Alt */
|
||||||
rdp_inst->input->KeyboardEvent(rdp_inst->input, KBD_FLAGS_DOWN, alt);
|
rdp_inst->input->KeyboardEvent(rdp_inst->input, KBD_FLAGS_DOWN, alt);
|
||||||
|
|
||||||
@ -256,6 +259,9 @@ void __guac_rdp_send_altcode(guac_client* client, const char* altcode) {
|
|||||||
/* Release Alt */
|
/* Release Alt */
|
||||||
rdp_inst->input->KeyboardEvent(rdp_inst->input, KBD_FLAGS_RELEASE, alt);
|
rdp_inst->input->KeyboardEvent(rdp_inst->input, KBD_FLAGS_RELEASE, alt);
|
||||||
|
|
||||||
|
/* Press all originally pressed modifiers */
|
||||||
|
__guac_rdp_update_keysyms(client, GUAC_KEYSYMS_ALL_MODIFIERS, 1, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int __guac_rdp_send_keysym(guac_client* client, int keysym, int pressed) {
|
int __guac_rdp_send_keysym(guac_client* client, int keysym, int pressed) {
|
||||||
|
Loading…
Reference in New Issue
Block a user