Xpra: Ticket #2616: AltGr + key on the left of enter should produce dead_tilde on Finnish keyboard layout but I get just a space

Server version:

Name : xpra Version : 3.0.6 Release : 0.20200125r25073xpra1.el7_7

Server OS: CentOS 7.7

Client version:

Xpra 4.0-r25058

Client OS: Windows 10

I'll attach -d keyboard log to this ticket.

Mon, 02 Mar 2020 11:14:33 GMT - akikoo: attachment set

-d keyboard when I press AltGr?+key left of enter

Mon, 02 Mar 2020 11:16:04 GMT - akikoo: summary changed

Mon, 02 Mar 2020 16:44:32 GMT - Antoine Martin: status changed

FWIW: just tried it, and I did get a dead_tilde in xev. That's using a trunk (4.0) server though.

Tue, 03 Mar 2020 07:35:17 GMT - Antoine Martin:

With trunk or 3.0 and python3:

$ xpra info :4 | grep perispomeni=
$ DISPLAY=:4 xmodmap -pke | grep " 35 ="
keycode  35 = dead_diaeresis dead_circumflex dead_diaeresis dead_circumflex dead_tilde dead_macron dead_tilde
XPRA_DEBUG_KEYSYMS=dead_perispomeni xpra start ...
set_keyboard_layout_group(1) config=KeyboardConfig(fi /  / None), current keyboard group=0
setting XKB layout group 1
get_keycode(186, 'dead_perispomeni')=35 (keyname translation)
process_key_action(['key-action', 2, b'dead_perispomeni', True, (b'mod5', b'mod2'), 65107, b'', 186, 1]) server keycode=35

With 3.0 and python2:

$ xpra info :5 | grep perispomeni=
XPRA_DEBUG_KEYSYMS=dead_perispomeni xpra start ...
set_keycode_translation: find_keycode(50, 'dead_perispomeni', 10) x11 keycodes=()
set_keycode_translation: find_keycode(50, 'dead_perispomeni', 8) x11 keycodes=()
set_keycode_translation: find_keycode(186, 'dead_perispomeni', 6) x11 keycodes=()
set_keycode_translation: find_keycode(186, 'dead_perispomeni', 8) x11 keycodes=()
set_keyboard_layout_group(1) config=KeyboardConfig(fi /  / None), current keyboard group=None
setting XKB layout group 1
get_keycode(186, 'dead_perispomeni')=-1 (keyname translation)
process_key_action(['key-action', 1, 'dead_perispomeni', True, ('mod5', 'mod2'), 65107, '', 186, 1]) server keycode=-1

So this looks like it could be a regression with python3, one that just happens to make things work better - but not as the code intended!?

Tue, 03 Mar 2020 09:16:37 GMT - Antoine Martin:

Keyboard fixes:

The source of the problem: with python3 / GTK3 the add_gtk_keynames method finds the dead_perispomeni keysym and adds it to the translation map, but the GTK2 keymap does not have it:

So the X11 keymap does not have it at all, but GTK3 maps it anyway?

Tue, 03 Mar 2020 10:12:43 GMT - Antoine Martin: owner, status changed

Found some related tickets: Add dead_perispomeni to keysymdef.h (Greek): When the user types a compose sequence that involves 'perispomeni', the system emits the dead_tilde keysym. Once the sequence is completed, GTK+ checks if the base character is Greek, and if so, it switches 'tilde' to the real 'perispomeni'. gtk compose-parse.py.

Server-side workaround for GTK2 applied in r25480: we map perispomeni to tilde. @akikoo: does that work for you? (3.0.7-RC packages for centos 7.7 builds uploaded here: https://xpra.org/beta.

If that's not sufficient and you really want perispomeni instead, we would need to modify the server keymap instead of just translating keys. That's harder and not really something that should be done in the LTS 3 branch.

Tue, 03 Mar 2020 11:15:47 GMT - akikoo:

Updating to "xpra x86_64 3.0.7-0.20200303r25480xpra2.el7_7 winswitch-beta" fixed the dead_tilde problem for me on the Finnish keyboard layout.

Tue, 03 Mar 2020 11:33:51 GMT - Antoine Martin: status changed; resolution set

Sat, 23 Jan 2021 05:56:07 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2616