Xpra: Ticket #62: AltGr not working with "Keyboard synchronized" = off

With the current xpra 0.0.7.32 and "Keyboard synchronized" unchecked the key bindings using AltGr don't work anymore.

Here's xev with k-s checked:

KeyPress event, serial 30, synthetic NO, window 0xa00001,
    root 0xfd, subw 0x0, time 2809973731, (409,199), root:(413,222),
    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
KeyPress event, serial 30, synthetic NO, window 0xa00001,
    root 0xfd, subw 0x0, time 2809974060, (409,199), root:(413,222),
    state 0x80, keycode 53 (keysym 0xab, guillemotleft), same_screen YES,
    XLookupString gives 2 bytes: (c2 ab) "«"
    XmbLookupString gives 2 bytes: (c2 ab) "«"
    XFilterEvent returns: False
KeyRelease event, serial 30, synthetic NO, window 0xa00001,
    root 0xfd, subw 0x0, time 2809974062, (409,199), root:(413,222),
    state 0x80, keycode 53 (keysym 0xab, guillemotleft), same_screen YES,
    XLookupString gives 2 bytes: (c2 ab) "«"
    XFilterEvent returns: False

with k-s unchecked:

KeyPress event, serial 44, synthetic NO, window 0xa00001,
    root 0xfd, subw 0x0, time 2810010702, (238,217), root:(246,263),
    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 44, synthetic NO, window 0xa00001,
    root 0xfd, subw 0x0, time 2810010702, (238,217), root:(246,263),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
KeyPress event, serial 44, synthetic NO, window 0xa00001,
    root 0xfd, subw 0x0, time 2810011346, (238,217), root:(246,263),
    state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
    XLookupString gives 1 bytes: (78) "x"
    XmbLookupString gives 1 bytes: (78) "x"
    XFilterEvent returns: False
KeyRelease event, serial 44, synthetic NO, window 0xa00001,
    root 0xfd, subw 0x0, time 2810011346, (238,217), root:(246,263),
    state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
    XLookupString gives 1 bytes: (78) "x"
    XFilterEvent returns: False


Sat, 31 Dec 2011 15:44:22 GMT - pmarek: attachment set


Sat, 31 Dec 2011 15:46:42 GMT - pmarek:

I'm pressing AltGR+x - see the above key numbers.


Sat, 31 Dec 2011 15:48:26 GMT - pmarek: attachment set


Tue, 03 Jan 2012 15:40:07 GMT - Antoine Martin: attachment set

workaround for altgr modifier mapping


Tue, 03 Jan 2012 15:41:49 GMT - Antoine Martin:

The patch above works, but this is not the correct solution: we now have modifier mappings available (at least in xposix), so we should generate the modifier map from those.


Wed, 04 Jan 2012 18:05:35 GMT - Antoine Martin: attachment set

much better solution which detects "nuisance" keys


Wed, 04 Jan 2012 19:57:43 GMT - Antoine Martin:

r394 (see the long changelog message for details) contains the proper fix for this, also ensures that capslock and numlock are properly synchronized.

Please confirm that this works for you and that this does not cause regressions when connecting to/from older versions.


Thu, 05 Jan 2012 10:53:54 GMT - pmarek:

Hmmm, at least connecting _to_ an "old" version (latest package, ie. 0.0.7.32-1) with r395 makes AltGr _dead_ - neither with nor without keyboard synchronized it does anything.


Thu, 05 Jan 2012 15:50:47 GMT - Antoine Martin:

Let's make this more interesting by introducing some new factors into the equation:


Thu, 05 Jan 2012 15:55:41 GMT - Antoine Martin: owner, status, description changed


Fri, 06 Jan 2012 16:35:41 GMT - Antoine Martin: attachment set

useful tool for seeing what the keyboard is doing


Mon, 09 Jan 2012 19:01:22 GMT - Antoine Martin: attachment set

much better patch which implements raw keycodes for all platforms


Tue, 10 Jan 2012 20:10:51 GMT - Antoine Martin:

r417 should work and supports all platforms I tested: Ubuntu 10.04, Ubuntu 11.10, Fedora, Windows XP, Mac OS X, OpenBSD... Both with and without "--no-keyboard-sync"

Please let me know if I can close this ticket.


Wed, 11 Jan 2012 10:03:17 GMT - pmarek:

Testing 0.7.33:

With "keyboard synchronized" = unchecked the key repeat bug does no longer happen; with that checked I see the unwanted repetitions.

Thanks a lot!


Wed, 11 Jan 2012 10:22:20 GMT - Antoine Martin: status changed; resolution set


Mon, 20 Feb 2012 19:24:53 GMT - Antoine Martin: milestone changed; version set


Sat, 23 Jan 2021 04:44:30 GMT - migration script:

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