Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AltGr not working with "Keyboard synchronized" = off #62

Closed
totaam opened this issue Dec 31, 2011 · 20 comments
Closed

AltGr not working with "Keyboard synchronized" = off #62

totaam opened this issue Dec 31, 2011 · 20 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 31, 2011

Issue migrated from trac ticket # 62

component: android | priority: major | resolution: fixed

2011-12-31 12:16:09: pmarek created the issue


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

@totaam
Copy link
Collaborator Author

totaam commented Dec 31, 2011

2011-12-31 15:44:22: pmarek uploaded file dat.tar.gz (3.6 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Dec 31, 2011

2011-12-31 15:46:42: pmarek commented


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

@totaam
Copy link
Collaborator Author

totaam commented Dec 31, 2011

2011-12-31 15:48:26: pmarek uploaded file host.tar.bz2 (3.2 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Jan 3, 2012

2012-01-03 15:40:07: totaam uploaded file xpra-altgr.patch (5.9 KiB)

workaround for altgr modifier mapping

@totaam
Copy link
Collaborator Author

totaam commented Jan 3, 2012

2012-01-03 15:41:50: totaam commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 4, 2012

2012-01-04 18:05:35: totaam uploaded file xpra-xkbmod2.patch (25.1 KiB)

much better solution which detects "nuisance" keys

@totaam
Copy link
Collaborator Author

totaam commented Jan 4, 2012

2012-01-04 19:57:43: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2012

2012-01-05 10:53:54: pmarek commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2012

2012-01-05 10:53:54: totaam

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2012

2012-01-05 15:50:48: totaam commented


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...

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2012

2012-01-05 15:55:42: totaam changed status from new to accepted

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2012

2012-01-05 15:55:42: totaam changed owner from antoine to totaam

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2012

2012-01-05 15:55:42: totaam edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Jan 6, 2012

2012-01-06 16:35:42: totaam uploaded file gtk_view_keyboard.py (2.7 KiB)

useful tool for seeing what the keyboard is doing

@totaam
Copy link
Collaborator Author

totaam commented Jan 9, 2012

2012-01-09 19:01:23: totaam uploaded file xpra-xkbmod3.patch (63.3 KiB)

much better patch which implements raw keycodes for all platforms

@totaam
Copy link
Collaborator Author

totaam commented Jan 10, 2012

2012-01-10 20:10:52: totaam commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 11, 2012

2012-01-11 10:03:18: pmarek commented


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!

@totaam
Copy link
Collaborator Author

totaam commented Jan 11, 2012

2012-01-11 10:22:20: totaam changed status from accepted to closed

@totaam
Copy link
Collaborator Author

totaam commented Jan 11, 2012

2012-01-11 10:22:20: totaam changed resolution from ** to fixed

@totaam totaam closed this as completed Jan 11, 2012
@totaam
Copy link
Collaborator Author

totaam commented Feb 20, 2012

2012-02-20 19:24:53: totaam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant