xpra icon
Bug tracker and wiki

Opened 2 years ago

Closed 11 months ago

Last modified 10 months ago

#858 closed defect (fixed)

HTML 5 Client does not have NumLock sync

Reported by: maxmylyn Owned by: maxmylyn
Priority: major Milestone: 1.0
Component: html5 Version: 0.15.x
Keywords: Cc:

Description

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.

Change History (7)

comment:1 Changed 2 years ago by Antoine Martin

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 num*lock will turn up quite a few hits.

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

comment:2 Changed 13 months ago by Antoine Martin

Milestone: 0.160.18
Owner: changed from Josh to maxmylyn

@maxmylyn: is this still a problem?

comment:3 Changed 13 months ago by maxmylyn

Owner: changed from maxmylyn to Antoine Martin

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

comment:4 Changed 11 months ago by Antoine Martin

Owner: changed from Antoine Martin to maxmylyn

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.

comment:5 Changed 11 months ago by maxmylyn

Resolution: fixed
Status: newclosed


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


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.

comment:6 Changed 11 months ago by Antoine Martin

Quick and dirty workaround is to disconnect, toggle numlock


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.

comment:7 Changed 10 months ago by Antoine Martin

Milestone: 0.181.0

Milestone renamed

Note: See TracTickets for help on using tickets.