Genymobile / Genymobile/scrcpy
Accented characters don't work with HID keyboard in X11, but do work in Wayland
- Dominant language
- C
- Stars
- 150k
- Forks
- 13.8k
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
Hello,
up to now I used scrcpy with simulating the physical HID keyboard for typing accented characters in Wayland without any problem. Recently I had to switch from Wayland to X11 and realized that I cannot type accented characters anymore. I'm running scrcpy with the same parameters as earlier and din't changed anything in my my Ubuntu 24.04 desktop, nor in phone. When I log back into Wayland session it works again, if I log into X11 session it still doesn't.
I realized this issue when I was using scrcpy 2.7. Unfortunately upgrade to 3.1 didn't helped here.
I did two same tests, one in Wayland, second in X11, see logs below:
Wayland log:
```
scrcpy --tcpip=192.168.1.110 -K --no-audio --window-height=1080 -Vverbose --no-audio --no-mouse-hover
scrcpy 3.1
INFO: Connecting to 192.168.1.110:5555...
INFO: Connected to 192.168.1.110:5555
DEBUG: Device serial: 192.168.1.110:5555
DEBUG: Using server: /usr/local/share/scrcpy/scrcpy-server
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 47.8 MB/s (90640 bytes in 0.002s)
[server] INFO: Device: [Xiaomi] POCO M2012K11AG (Android 13)
DEBUG: Server connected
VERBOSE: input: UHID create [1] 0000:0000 name=(null) report_desc_size=63
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
DEBUG: Using icon: /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png
VERBOSE: UHID output [1] 01
[server] DEBUG: Using video encoder: 'OMX.qcom.video.encoder.avc'
[server] DEBUG: Display: using SurfaceControl API
INFO: Renderer: opengl
INFO: OpenGL version: 3.3 (Compatibility Profile) Mesa 23.0.0-devel
INFO: Trilinear filtering enabled
DEBUG: Demuxer 'video': starting thread
INFO: Texture: 1080x2400
VERBOSE: input: touch [id=mouse] down position=697,1955 pressure=1.000000 action_button=000001 buttons=000001
VERBOSE: input: touch [id=mouse] up position=697,1955 pressure=0.000000 action_button=000001 buttons=000000
VERBOSE: keys[1f] = true
VERBOSE: hid keyboard: key down scancode=1f (31) mod=00
VERBOSE: input: UHID input [1] 00 00 1F 00 00 00 00 00
VERBOSE: keys[1f] = false
VERBOSE: hid keyboard: key up scancode=1f (31) mod=00
VERBOSE: input: UHID input [1] 00 00 00 00 00 00 00 00
```
X11 log:
```
scrcpy --tcpip=192.168.1.110 -K --no-audio --window-height=1080 -Vverbose --no-audio --no-mouse-hover
scrcpy 3.1
* daemon not running; starting now at tcp:5037
* daemon started successfully
INFO: Connecting to 192.168.1.110:5555...
INFO: Connected to 192.168.1.110:5555
DEBUG: Device serial: 192.168.1.110:5555
DEBUG: Using server: /usr/local/share/scrcpy/scrcpy-server
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 52.5 MB/s (90640 bytes in 0.002s)
[server] INFO: Device: [Xiaomi] POCO M2012K11AG (Android 13)
DEBUG: Server connected
VERBOSE: input: UHID create [1] 0000:0000 name=(null) report_desc_size=63
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
DEBUG: Using icon: /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png
[server] DEBUG: Using video encoder: 'OMX.qcom.video.encoder.avc'
VERBOSE: UHID output [1] 01
[server] DEBUG: Display: using SurfaceControl API
INFO: Renderer: opengl
INFO: OpenGL version: 3.3 (Compatibility Profile) Mesa 23.0.0-devel
INFO: Trilinear filtering enabled
DEBUG: Demuxer 'video': starting thread
INFO: Texture: 1080x2400
VERBOSE: input: touch [id=mouse] down position=602,1931 pressure=1.000000 action_button=000001 buttons=000001
VERBOSE: input: touch [id=mouse] up position=602,1931 pressure=0.000000 action_button=000001 buttons=000000
```
Note: I typed the same accented character at the end of the X11 test above, but nothing appeared in the log. The same do apply for any other accented characters. No log output for them at all.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported command on Ubuntu 24.04 under both X11 and Wayland, comparing verbose output while entering accented characters. Trace the HID keyboard input path from the desktop event handling to the logged key events, using the supplied logs as the behavioral comparison. Done means accented characters produce equivalent HID input under X11 without regressing Wayland.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ubuntu
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100