xpra icon
Bug tracker and wiki

Opened 4 months ago

Closed 4 months ago

#2616 closed defect (fixed)

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

Reported by: akikoo Owned by: akikoo
Priority: minor Milestone: 4.0
Component: client Version: 3.0.x
Keywords: Cc:

Description

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.

Attachments (1)

xpra-dead-tilde.txt (19.9 KB) - added by akikoo 4 months ago.
-d keyboard when I press AltGr?+key left of enter

Download all attachments as: .zip

Change History (8)

Changed 4 months ago by akikoo

Attachment: xpra-dead-tilde.txt added

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

comment:1 Changed 4 months ago by akikoo

Summary: AltGt + key on the left of enter should produce dead_tilde on Finnish keyboard layout but I get just a spaceAltGr + key on the left of enter should produce dead_tilde on Finnish keyboard layout but I get just a space

comment:2 Changed 4 months ago by Antoine Martin

Status: newassigned

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

comment:3 Changed 4 months ago by Antoine Martin

With trunk or 3.0 and python3:

$ xpra info :4 | grep perispomeni=
client.keyboard.keycode.dead_perispomeni=35
keyboard.keycode.dead_perispomeni=35
$ 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!?

Last edited 4 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 4 months ago by Antoine Martin

Keyboard fixes:

  • r25473 keycode mapping backport for v3 (can be disabled via env var)
  • r25474 fix raw mode
  • r25475 python3 fix (does not break dead_perispomeni mapping!)
  • r25477 log keys added from the gtk keymap

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:

  • with GTK3:
    add_gtk_keynames() gtk keymap=[... (65106, 'dead_circumflex', 35, 0, 1), (65107, 'dead_perispomeni', 35, 0, 2), (65108, 'dead_macron', 35, 0, 3), ...]
    keycode  35 = dead_diaeresis dead_circumflex dead_diaeresis dead_circumflex dead_tilde dead_macron dead_tilde
    
  • with GTK2:
    add_gtk_keynames() gtk keymap=[... (65106, 'dead_circumflex', 35, 0, 1), (65107, 'dead_tilde', 35, 0, 2), (65108, 'dead_macron', 35, 0, 3), ...]
    keycode  35 = dead_diaeresis dead_circumflex dead_diaeresis dead_circumflex dead_tilde dead_macron dead_tilde
    

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

Last edited 4 months ago by Antoine Martin (previous) (diff)

comment:5 Changed 4 months ago by Antoine Martin

Owner: changed from Antoine Martin to akikoo
Status: assignednew

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.

comment:6 Changed 4 months ago by 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.

comment:7 Changed 4 months ago by Antoine Martin

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.