xpra icon
Bug tracker and wiki

Opened 3 months ago

Last modified 2 months ago

#2154 assigned defect

Keyboard mapping issues in HTML5 client

Reported by: berserker Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: html5 Version: 2.4.x
Keywords: keyboard Cc:

Description

I know that there is a long guide how to report keyboard layout mapping problems, but I think here the issue is clearly in the HTML5 JS code.

Most of the users to whom I tried to provide remote access through a browser report that input is not working even with the en_US layout. It is only possible to input numbers into xterm. Other keys cause beeps and either spaces or numbers are typed instead of, e.g., letters.

For me, en_US layout is working at the beginning. Switching to Russian layout breaks everything and switching back to en_US does not help. Here are logs from the JS console (Browser version: Firefox 65.0 (64-bit). OS: Ubuntu 18.04, LANG=en_US.UTF-8. Xpra 2.4.2 is running inside a CentOS 7 Docker container).

debug enabled for: 
Array []
1:438:5
connection_progress( Initializing ,   ,  20 ) 1:399:6
connection_progress( Connecting to server ,  localhost:8888/display/1/ ,  40 ) 1:399:6
we have webworker support Client.js:320:3
we can use websocket in webworker Client.js:329:5
connection_progress( Opening WebSocket connection ,  ws://localhost:8888/display/1/ ,  60 ) Client.js:228:2
connection_progress( WebSocket connection established ,   ,  80 ) Client.js:228:2
sending hello Client.js:942:3
return all encodings:  
Array(6) [ "jpeg", "png", "rgb", "rgb32", "h264", "mpeg1" ]
Client.js:865:3
return all encodings:  
Array(6) [ "jpeg", "png", "rgb", "rgb32", "h264", "mpeg1" ]
Client.js:865:3
getFirstBrowserLanguage()= en-US Utilities.js:135:3
getKeyboardLayout()= us Utilities.js:150:3
hello capabilities: [object Object] Client.js:956:2
got hello: server version 2.4.2 accepted our connection Client.js:228:2
server screen sizes: 
Array(1571) [ (2) […], (2) […], (2) […], (2) […], (2) […], (2) […], (2) […], (2) […], (2) […], (2) […], … ]
Client.js:1648:5
connection_progress( Session started ,   ,  100 ) Client.js:228:2
startup complete Client.js:228:2
connection-established Client.js:228:2
server connection is OK Client.js:890:4 

Now, if I type something into xterm having en_US layout active, everything works fine. If I try to switch the layout to Russian, I get the following in the JS console

input language changed from null to ru Client.js:595:3 

I don't see symbols in xterm, only spaces, but I think this is fonts-related issue.

Then, if I switch back to en_US layout and try to type something, I see nothing in the JS console about input language change. And typing causes beeps.

Attachments (3)

start-postprocessed.log (77.7 KB) - added by berserker 3 months ago.
xpra-noasciivt.log (195.6 KB) - added by berserker 3 months ago.
xpra+xev.log (202.2 KB) - added by berserker 2 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 3 months ago by Antoine Martin

Owner: changed from Antoine Martin to berserker

Most of the users to whom I tried to provide remote access through a browser report that input is not working even with the en_US layout

How do they en_US?

Switching to Russian layout breaks everything and switching back to en_US does not help

How do you switch?

Then, if I switch back to en_US layout and try to type something, I see nothing in the JS console about input language change. And typing causes beeps.

How to you switch back?

It would help to have the server log, with or without -d keyboard.

Changed 3 months ago by berserker

Attachment: start-postprocessed.log added

Changed 3 months ago by berserker

Attachment: xpra-noasciivt.log added

comment:2 in reply to:  1 Changed 3 months ago by berserker

Replying to Antoine Martin:

Most of the users to whom I tried to provide remote access through a browser report that input is not working even with the en_US layout

How do they en_US?

Lets forget about other users for now.

Switching to Russian layout breaks everything and switching back to en_US does not help

How do you switch?

Using CapsLock while having browser tab with HTML5 client active.

Then, if I switch back to en_US layout and try to type something, I see nothing in the JS console about input language change. And typing causes beeps.

How to you switch back?

The same way.

It would help to have the server log, with or without -d keyboard.

I've attached the log xpra-noasciivt.log with keyboard debugging ON. Plz ignore and delete the other attachment.
At first, I typed ls into xterm and hit Enter.
Then I switched the layout using CapsLock, typed фыва and pushed Enter again.
Then I switched back to en_US and tried to type ls. Even though there are l and s keys logged, what I got in xterm was ~4

Last edited 3 months ago by Antoine Martin (previous) (diff)

Changed 2 months ago by berserker

Attachment: xpra+xev.log added

comment:3 in reply to:  1 Changed 2 months ago by berserker

Milestone: improbable2.5
Owner: changed from berserker to Antoine Martin
Priority: majorcritical

Hi. I've attached a log with xev running instead of xterm to see what X11 applications receive when I type.
As can be seen, after switching layout to ru and back to en, xev starting to get F10 when I press l and 4 when s.

Do you have any ideas? Need other logs?

comment:4 Changed 2 months ago by Antoine Martin

Milestone: 2.53.0
Owner: changed from Antoine Martin to Antoine Martin
Priority: criticalmajor
Status: newassigned

Do you have any ideas? Need other logs?

I don't really know how to re-create this setup, having more information as per wiki/Keyboard would help.

Too late for 2.5, re-scheduling.

Note: See TracTickets for help on using tickets.