Subject: Bug#1612: Keyboard layout breaks when session is restored.

From: Александр Новосёлов<[email-masked]>
Date: Wed, 23 Aug 2023 17:13:58 +0300

Package: x2goserver
Version: 4.1.0.6

Hi!

Keyboard layout breaks when session is restored.

The problem has been observed since the version X2Go Server (4.1.0.5) 
released.

X2Go Server from ubuntu (20.04) stable ppa.

1) The first time you connect everything works fine.
2) Disconnect and restore the session —  The keyboard is broken. The 
cursor movement buttons ( )generate such values in xev:

KeyPress event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555749669, (95,-11), root:(128,65),
     state 0x0, keycode 98 (keysym 0xff26, Katakana), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: False

KeyRelease event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555749809, (95,-11), root:(128,65),
     state 0x0, keycode 98 (keysym 0xff26, Katakana), same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False

KeyPress event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555753473, (95,-11), root:(128,65),
     state 0x0, keycode 104 (keysym 0xff8d, KP_Enter), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
     XFilterEvent returns: False

KeyRelease event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555753608, (95,-11), root:(128,65),
     state 0x0, keycode 104 (keysym 0xff8d, KP_Enter), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
     XFilterEvent returns: False

KeyPress event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555754599, (95,-11), root:(128,65),
     state 0x0, keycode 100 (keysym 0xff23, Henkan_Mode), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: False

KeyRelease event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555754773, (95,-11), root:(128,65),
     state 0x0, keycode 100 (keysym 0xff23, Henkan_Mode), same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False

KeyPress event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555755647, (95,-11), root:(128,65),
     state 0x0, keycode 102 (keysym 0xff22, Muhenkan), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: False

KeyRelease event, serial 47, synthetic NO, window 0x1000001,
     root 0xa1, subw 0x0, time 555755861, (95,-11), root:(128,65),
     state 0x0, keycode 102 (keysym 0xff22, Muhenkan), same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False