rustdesk / rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
https://rustdesk.com
GNU Affero General Public License v3.0
75.99k stars 10k forks source link

Autotype / virtual keypress not working #7079

Closed ramon-flashtec closed 9 months ago

ramon-flashtec commented 9 months ago

Bug Description

When using typing functions like Auto-type in KeePass or AutoKey, the virtual keypresses are not working. I tried KeePass XC (Linux & Windows) and also Autokey on Linux with every keyboard mode of RustDesk and both directions.

How to Reproduce

Install KeePass, create a Password and use Autotyping Feature into the RustDesk Window.

Expected Behavior

RustDesk should accept the virtual keypresses.

Operating system(s) on local side and remote side

Ubuntu 22.04 ,18.04 > Windows 10, 11, Server 2019 / Windows 10, 11 > Windows 10, 11, Server 2019

RustDesk Version(s) on local side and remote side

1.2.3 > 1.2.3

Screenshots

windows-11-pro-screen0.webm

Additional Context

No response

rustdesk commented 9 months ago

tracked by https://github.com/rustdesk/rustdesk/issues/4367

ramon-flashtec commented 9 months ago

I figured out a workaround for AutoKey (linux only) to type the clipboard (e.g. a password for login-mask)..

install xdotool package

Setup the following script in AutoKey and set a keyboard hotkey (e.g. F12):

def type_slow(text):
  command = "xdotool type --delay 300 '" + text + "'"
  system.exec_command(command, getOutput=False)

text = clipboard.get_clipboard()
time.sleep(0.2)

type_slow(text)

clipboard.fill_clipboard("")

copy your password switch to RustDesk and press your hotkey (F12)

maybe that helps someone :o)