I'm logging in to a remote Linux system through Citrix to a Windows machine and then through an additional remote desktop solution to the Linux machine. Unfortunately, there is a bug somewhere in the Citrix part, so that when I press Alt-Gr on a German keyboard, the system receives extra key events, which mess up the interpretation. In the end any combination with Alt-Gr (most of the time) doesn't work. With xev pressing the Alt-Gr key alone looks like:
KeyPress event, serial 38, synthetic NO, window 0x2600001,
root 0xf3, subw 0x2600002, time 678212244, (37,36), root:(84,104),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 38, synthetic NO, window 0x2600001,
root 0xf3, subw 0x2600002, time 678212253, (37,36), root:(84,104),
state 0x4, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x2600001,
root 0xf3, subw 0x2600002, time 678212340, (37,36), root:(84,104),
state 0x84, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x2600001,
root 0xf3, subw 0x2600002, time 678212351, (37,36), root:(84,104),
state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XFilterEvent returns: False
Note the extra Control_L which shouldn't be there. Without this intermediate Citrix (only the remote desktop solution), it would work and look like
KeyPress event, serial 38, synthetic NO, window 0x2600001,
root 0xf3, subw 0x2600002, time 679278220, (37,44), root:(84,112),
state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x2600001,
root 0xf3, subw 0x2600002, time 679278313, (37,44), root:(84,112),
state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XFilterEvent returns: False
which works just fine.
Currently, there is no easy way to fix the intermediate Citrix.
Do you know a hack to force the first case to forget the extra Control_L (or make it automatically release)?
If somehow the system would see my ISO_Level3_Shift with a state 0x0, it would probably work.