xpra icon
Bug tracker and wiki

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#62 closed defect (fixed)

AltGr not working with "Keyboard synchronized" = off

Reported by: pmarek Owned by: Antoine Martin
Priority: major Milestone: 0.0.7.x
Component: android Version: 0.0.7.34
Keywords: Cc:

Description (last modified by Antoine Martin)

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

Attachments (6)

dat.tar.gz (3.6 KB) - added by pmarek 8 years ago.
host.tar.bz2 (3.2 KB) - added by pmarek 8 years ago.
xpra-altgr.patch (5.9 KB) - added by Antoine Martin 8 years ago.
workaround for altgr modifier mapping
xpra-xkbmod2.patch (25.1 KB) - added by Antoine Martin 8 years ago.
much better solution which detects "nuisance" keys
gtk_view_keyboard.py (2.7 KB) - added by Antoine Martin 8 years ago.
useful tool for seeing what the keyboard is doing
xpra-xkbmod3.patch (63.3 KB) - added by Antoine Martin 8 years ago.
much better patch which implements raw keycodes for all platforms

Download all attachments as: .zip

Change History (16)

Changed 8 years ago by pmarek

Attachment: dat.tar.gz added

comment:1 Changed 8 years ago by pmarek

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

Changed 8 years ago by pmarek

Attachment: host.tar.bz2 added

Changed 8 years ago by Antoine Martin

Attachment: xpra-altgr.patch added

workaround for altgr modifier mapping

comment:2 Changed 8 years ago by 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.

Changed 8 years ago by Antoine Martin

Attachment: xpra-xkbmod2.patch added

much better solution which detects "nuisance" keys

comment:3 Changed 8 years ago by 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.

comment:4 Changed 8 years ago by 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.

Last edited 8 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 8 years ago by Antoine Martin

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

  • win32 sends us a Num_Lock key press, but it is never reported as a modifier
  • win32: caps now needs to be added to the list of keys we report
  • osx: not sure about the numlock key, seems to come up as Escape keyval=65307
  • osx also tries to be too clever and only sends one event for the capslock key: key-up or key-down to tell us if caps is on, rather than the raw key events we want...

comment:6 Changed 8 years ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to Antoine Martin
Status: newaccepted

Changed 8 years ago by Antoine Martin

Attachment: gtk_view_keyboard.py added

useful tool for seeing what the keyboard is doing

Changed 8 years ago by Antoine Martin

Attachment: xpra-xkbmod3.patch added

much better patch which implements raw keycodes for all platforms

comment:7 Changed 8 years ago by 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.

comment:8 Changed 8 years ago by 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!

comment:9 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

comment:10 Changed 8 years ago by Antoine Martin

Milestone: current0.0.7.x
Version: 0.0.7.34
Note: See TracTickets for help on using tickets.