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

HTML 5 Client does not have NumLock sync #858

Closed
totaam opened this issue May 12, 2015 · 12 comments
Closed

HTML 5 Client does not have NumLock sync #858

totaam opened this issue May 12, 2015 · 12 comments

Comments

@totaam
Copy link
Collaborator

totaam commented May 12, 2015

Issue migrated from trac ticket # 858

component: html5 | priority: major | resolution: fixed

2015-05-12 19:46:15: maxmylyn created the issue


Tested with the following against a Fedora 21 r9329 trunk and 0.15.0 server:

  • Windows 8.1 Firefox and Chrome

  • OSX 10.10 Safari

In the Windows HTML5 viewer, I can hit the NumLock button and it will work for one character, then it goes back to disabled. This is problematic as Windows will also toggle its NumLock which will cause a desync of NumLock - this was fixed in #312

In OSX, it is especially problematic as I can not enable NumLock due to Apple keyboards, annoyingly, not having a NumLock key, just a key marked 'clear' that apparently doesn't do anything.

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2015

2015-05-13 03:14:52: antoine commented


Some information that might be useful for fixing this:

  • some platforms cannot provide the numlock state with mouse or keyboard events, so for those we use xkbmap_mod_missing to tell the server not to try to sync the numlock state for those events
  • IIRC, some platforms send a single key event when pressing+releasing numlock..

Grepping the source code for numlock* will turn up quite a few hits.

@totaam
Copy link
Collaborator Author

totaam commented Apr 10, 2016

2016-04-10 07:07:21: antoine changed owner from joshiggins to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Apr 10, 2016

2016-04-10 07:07:21: antoine commented


@maxmylyn: is this still a problem?

@totaam
Copy link
Collaborator Author

totaam commented Apr 12, 2016

2016-04-12 22:03:15: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented Apr 12, 2016

2016-04-12 22:03:15: maxmylyn commented


As of r12379 I still do not have numlock. Hitting the NumLock key has no effect (other than toggling it on my local machine)

@totaam
Copy link
Collaborator Author

totaam commented Jun 11, 2016

2016-06-11 18:00:26: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Jun 11, 2016

2016-06-11 18:00:26: antoine commented


Done in r12797.

Important caveat: there is no way of knowing the current state of numlock in Javascript, so we manage it ourselves and toggle the value whenever we detect that the numlock key is pressed (and we only get those events if we have focus when they occur).
So numlock can very easily start / go out of sync with the real keyboard state.

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2016

2016-06-13 19:54:02: maxmylyn changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2016

2016-06-13 19:54:02: maxmylyn set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2016

2016-06-13 19:54:02: maxmylyn commented


[[br]]

So numlock can very easily start / go out of sync with the real keyboard state.
[[br]]

Noted. Quick and dirty workaround is to disconnect, toggle numlock (so it'll match with the server), then reconnect. I'm not sure if there's going to be an elegant fix since browsers are so sandboxed.

Closing.

@totaam totaam closed this as completed Jun 13, 2016
@totaam
Copy link
Collaborator Author

totaam commented Jun 14, 2016

2016-06-14 10:43:14: antoine commented


Quick and dirty workaround is to disconnect, toggle numlock
[[BR]]
As per comment:4, you can do the same thing without disconnecting: just hit numlock whilst the xpra browser window is NOT receiving the key events (focus some other window or minimize the browser temporarily). That's a lot easier than re-connecting.

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 17:52:23: antoine commented


Milestone renamed

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