679 |
return tr; |
return tr; |
680 |
} |
} |
681 |
|
|
682 |
|
static RD_BOOL |
683 |
|
is_modifier(uint8 scancode) |
684 |
|
{ |
685 |
|
switch (scancode) |
686 |
|
{ |
687 |
|
case SCANCODE_CHAR_LSHIFT: |
688 |
|
case SCANCODE_CHAR_RSHIFT: |
689 |
|
case SCANCODE_CHAR_LCTRL: |
690 |
|
case SCANCODE_CHAR_RCTRL: |
691 |
|
case SCANCODE_CHAR_LALT: |
692 |
|
case SCANCODE_CHAR_RALT: |
693 |
|
case SCANCODE_CHAR_LWIN: |
694 |
|
case SCANCODE_CHAR_RWIN: |
695 |
|
case SCANCODE_CHAR_NUMLOCK: |
696 |
|
return True; |
697 |
|
default: |
698 |
|
break; |
699 |
|
} |
700 |
|
return False; |
701 |
|
} |
702 |
|
|
703 |
|
static void |
704 |
|
save_remote_modifiers_if_modifier(uint8 scancode) |
705 |
|
{ |
706 |
|
if (!is_modifier(scancode)) |
707 |
|
return; |
708 |
|
|
709 |
|
saved_remote_modifier_state = remote_modifier_state; |
710 |
|
} |
711 |
|
|
712 |
void |
void |
713 |
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, |
714 |
RD_BOOL pressed, uint8 nesting) |
RD_BOOL pressed, uint8 nesting) |
732 |
{ |
{ |
733 |
rdp_send_scancode(ev_time, RDP_KEYRELEASE, tr.scancode); |
rdp_send_scancode(ev_time, RDP_KEYRELEASE, tr.scancode); |
734 |
restore_remote_modifiers(ev_time, tr.scancode); |
restore_remote_modifiers(ev_time, tr.scancode); |
735 |
|
save_remote_modifiers_if_modifier(tr.scancode); |
736 |
} |
} |
737 |
return; |
return; |
738 |
} |
} |
793 |
return ksname; |
return ksname; |
794 |
} |
} |
795 |
|
|
|
static RD_BOOL |
|
|
is_modifier(uint8 scancode) |
|
|
{ |
|
|
switch (scancode) |
|
|
{ |
|
|
case SCANCODE_CHAR_LSHIFT: |
|
|
case SCANCODE_CHAR_RSHIFT: |
|
|
case SCANCODE_CHAR_LCTRL: |
|
|
case SCANCODE_CHAR_RCTRL: |
|
|
case SCANCODE_CHAR_LALT: |
|
|
case SCANCODE_CHAR_RALT: |
|
|
case SCANCODE_CHAR_LWIN: |
|
|
case SCANCODE_CHAR_RWIN: |
|
|
case SCANCODE_CHAR_NUMLOCK: |
|
|
return True; |
|
|
default: |
|
|
break; |
|
|
} |
|
|
return False; |
|
|
} |
|
|
|
|
796 |
void |
void |
797 |
save_remote_modifiers(uint8 scancode) |
save_remote_modifiers(uint8 scancode) |
798 |
{ |
{ |