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

Key mapping error(win11 to Ubuntu 22) #6062

Closed
Tracked by #4367
siriume opened this issue Oct 17, 2023 · 21 comments
Closed
Tracked by #4367

Key mapping error(win11 to Ubuntu 22) #6062

siriume opened this issue Oct 17, 2023 · 21 comments
Labels
bug Something isn't working

Comments

@siriume
Copy link

siriume commented Oct 17, 2023

Bug Description

Hi. I use a Win11 PC and remote control a PC with LinuxMint 21.2 (Ubuntu 22.04). I encountered a problem with many key mappings. End -> Win, Home -> Pause Break, Page Up -> /, Page Down -> Menu, ↓ -> Win, ↑ -> Print Screen, ← -> Alt, /(num) -> Insert

How to Reproduce

End -> Win
Home -> Pause Break
Page Up ->
Page Down -> Menu
↓ -> Win
↑ -> Print Screen
← -> Alt
/(num) -> Insert

Expected Behavior

key mapping is correct.

Operating system(s) on local side and remote side

win11 -> Ubuntu

RustDesk Version(s) on local side and remote side

1.2.4 nightly

Screenshots

image

Additional Context

No response

@siriume siriume added the bug Something isn't working label Oct 17, 2023
@rustdesk
Copy link
Owner

tracked by #4367

@rustdesk
Copy link
Owner

@fufesou please confirm.

@fufesou
Copy link
Collaborator

fufesou commented Oct 17, 2023

I've tried Win11 -> Ubuntu 22.04.3, but I cannot reproduce this issue.

X11: Legacy mode, Map mode, Translation mode
Wayland: Map mode

@siriume
Copy link
Author

siriume commented Dec 15, 2023

I've tried Win11 -> Ubuntu 22.04.3, but I cannot reproduce this issue.

X11: Legacy mode, Map mode, Translation mode Wayland: Map mode

Can u try it with LinuxMint 21?

@fufesou
Copy link
Collaborator

fufesou commented Dec 16, 2023

Can u try it with LinuxMint 21?

The key mappings are correct for me.

image

keymapping.mp4

Can you please:

  1. Try the nightly build again?
  2. Use another control side to test. To make sure if the error mapping occurs on the controlled side.
  3. Upload a video to provide more clues.

@siriume
Copy link
Author

siriume commented Dec 16, 2023

@siriume
Copy link
Author

siriume commented Dec 17, 2023

Can you please:

  1. Try the nightly build again?
  2. Use another control side to test. To make sure if the error mapping occurs on the controlled side.
  3. Upload a video to provide more clues.
c172.30.0.90_20231217164538431_av1.webm

check this

@fufesou
Copy link
Collaborator

fufesou commented Dec 17, 2023

Can you please give a screenshot of the keyboard mode?

image

Maybe your local RustDesk version is not 1.2.4.

It's so wired that the key mappings are correct for me.

keys.mp4

@siriume
Copy link
Author

siriume commented Dec 26, 2023

RustDesk version:

image

keyboard test:

c199605808_20231226170709769_av1.webm

three model all the same

@siriume
Copy link
Author

siriume commented Dec 26, 2023

I switched the installation mode from deb to flatpak. This is because the deb mode cannot use the GPU correctly, causing the CPU usage to be too high, while flatpak is normal.

@fufesou
Copy link
Collaborator

fufesou commented Dec 26, 2023

I'm confused of what you're testing.

I just saw the keys on "onboard" are not the keys in the web. Not "Win" -> "LinuxMint 21.2".

Did you click the "onboard" keys on the remote side?
Or are you just type keys on local keyboard?

@siriume
Copy link
Author

siriume commented Dec 26, 2023

I'm confused of what you're testing.

I just saw the keys on "onboard" are not the keys in the web. Not "Win" -> "LinuxMint 21.2".

Did you click the "onboard" keys on the remote side? Or are you just type keys on local keyboard?

onboard is as same as my keyboard.

@fufesou
Copy link
Collaborator

fufesou commented Dec 26, 2023

It's strange that "onboard" keys are not the ones in the web tests.

The keys are correct when you directly use the remote keyboard?

@siriume
Copy link
Author

siriume commented Dec 26, 2023

when I connect this server use xrdp and rustdesk at the same time, xrdp keymapping is right, but rustdesk some keys is wrong.

@fufesou
Copy link
Collaborator

fufesou commented Dec 27, 2023

Thanks for your feedback.

Can you please try this temp build? https://github.com/fufesou/rustdesk/releases/tmp

It will print some additional logs of what keys it received and what keys it is simulating.

You can run the following command to see the output.

tail -f /root/.local/share/logs/RustDesk/server/* | grep 'REMOVE ME ====='

Please upload a video to help me find out which step the error occurs.

@siriume
Copy link
Author

siriume commented Dec 27, 2023

RustDesk version:

image

map mode:

c199605808_20231227160103329_av1.webm

@fufesou
Copy link
Collaborator

fufesou commented Dec 27, 2023

There are no changes to this build, expect some debug logs.

Please run tail -f /root/.local/share/logs/RustDesk/server/* | grep 'REMOVE ME =====' ast the same time.

So I can see what events the remote side has received and what keys it is simulating.

Please only upload videos of some typical keystrokes to avoid confusion, thank you.

@siriume
Copy link
Author

siriume commented Dec 27, 2023

sorry I forgot it.

~/.local/share/logs/RustDesk$ tail -f rustdesk_rCURRENT.log | grep 'REMOVE ME ====='
c199605808_20231227172345389_av1.webm
[2023-12-27 17:23:49.645437 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(22)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:49.645564 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(22)))
[2023-12-27 17:23:49.757140 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(22)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:49.757216 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(22)))
[2023-12-27 17:23:50.211153 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(51)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:50.220285 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(51)))
\[2023-12-27 17:23:50.290300 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(51)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:50.290388 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(51)))
[2023-12-27 17:23:50.835374 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(36)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:50.835473 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(36)))

[2023-12-27 17:23:50.915668 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(36)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:50.915731 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(36)))
[2023-12-27 17:23:52.630117 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(62)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:52.630182 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(62)))
[2023-12-27 17:23:52.715619 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(62)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:52.715680 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(62)))
[2023-12-27 17:23:53.258015 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(105)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:53.258084 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(105)))
^[[6~[2023-12-27 17:23:53.354751 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(105)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:53.354797 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(105)))
[2023-12-27 17:23:54.325535 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(118)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:54.325723 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(118)))
[2023-12-27 17:23:54.415351 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(118)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:54.416076 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(118)))
[2023-12-27 17:23:54.735471 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(119)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:54.735593 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(119)))
[2023-12-27 17:23:54.821141 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(119)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:54.821233 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(119)))
[2023-12-27 17:23:55.225497 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(113)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:55.225582 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(113)))
[2023-12-27 17:23:55.334603 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(113)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:55.334710 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(113)))
[2023-12-27 17:23:56.020157 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(110)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:56.020263 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(110)))
[2023-12-27 17:23:56.115567 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(110)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:56.120463 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(110)))
[2023-12-27 17:23:57.670883 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(115)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:57.670997 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(115)))
[2023-12-27 17:23:57.752635 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(115)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:23:57.754689 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(115)))
[2023-12-27 17:24:00.579868 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(115)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:00.580013 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(115)))
[2023-12-27 17:24:00.664638 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(115)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:00.665270 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(115)))
[2023-12-27 17:24:02.779782 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(111)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:02.779931 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(111)))
[2023-12-27 17:24:02.863474 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(111)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:02.864780 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(111)))
[2023-12-27 17:24:06.679288 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(111)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:06.679411 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(111)))
[2023-12-27 17:24:06.759014 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(111)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:06.766635 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(111)))
[2023-12-27 17:24:10.109603 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(116)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:10.109774 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(116)))
[2023-12-27 17:24:10.189546 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(116)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:10.189717 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(116)))
[2023-12-27 17:24:12.639350 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(116)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:12.641466 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(116)))
[2023-12-27 17:24:12.733926 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(116)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:12.759500 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(116)))
[2023-12-27 17:24:15.404524 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(112)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:15.404915 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(112)))
/[2023-12-27 17:24:15.498778 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(112)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:15.498868 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(112)))
[2023-12-27 17:24:15.869174 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(117)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:15.896848 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(117)))
[2023-12-27 17:24:15.954165 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(117)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:15.976016 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(117)))
[2023-12-27 17:24:16.579638 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(114)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:16.579807 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(114)))
[2023-12-27 17:24:16.668762 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(114)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:16.668835 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(114)))
[2023-12-27 17:24:18.784535 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(112)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:18.785317 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(112)))
/[2023-12-27 17:24:18.859412 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(112)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:18.861068 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(112)))
[2023-12-27 17:24:19.293697 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(117)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:19.293844 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(117)))
[2023-12-27 17:24:19.388523 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(117)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:19.393259 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(117)))
[2023-12-27 17:24:21.629111 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, press event: KeyEvent { down: true, press: false, modifiers: [], mode: Map, union: Some(Chr(114)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:21.629227 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyPress(RawKey(LinuxXorgKeycode(114)))
[2023-12-27 17:24:21.718750 +08:00] INFO [src/server/connection.rs:734] REMOVE ME =========== handle_input, release event: KeyEvent { down: false, press: false, modifiers: [], mode: Map, union: Some(Chr(114)), special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } 
[2023-12-27 17:24:21.718880 +08:00] INFO [src/server/input_service.rs:1152] REMOVE ME ===================== simulate_ evt: KeyRelease(RawKey(LinuxXorgKeycode(114)))

@fufesou
Copy link
Collaborator

fufesou commented Dec 27, 2023

It seems the key simulations on your machine are incorrect.

Can you please run the attached simple demo?

xx.mp4

simulate_keys.tar.gz

@siriume
Copy link
Author

siriume commented Dec 27, 2023

check this:

c199605808_20231227214426029_av1.webm
c199605808_20231227214948317_av1.webm

@fufesou
Copy link
Collaborator

fufesou commented Dec 27, 2023

@siriume Thanks for your feedback.

In an x11 environment, we use xtestfakekeyevent to simulate keyboard input.
It seems your machine is using a different set of keycodes.

I searched for some information, and some keycodes sets are similar to yours, but they seem to be different.
Because I didn't find relevant information. Also, maybe your x11 system is a little different than most.

Sorry I can't fix this right away.
I will consider referring to the code of xrdp later. But now I have to lower my priority on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants