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

Shift Button does not register #17

Open
chrisszbond opened this issue Apr 24, 2024 · 1 comment
Open

Shift Button does not register #17

chrisszbond opened this issue Apr 24, 2024 · 1 comment

Comments

@chrisszbond
Copy link

client.keyboard.press('Ctrl', 'Shift', 'i')

This will only result in Ctrl + i

The use of the Shift Button does not register.

What could be done? (Connecting to Linux via VNC)

@inqrphl
Copy link

inqrphl commented Jan 13, 2025

You have to use the asyncvnc.keyboard.hold context manager

with vnc_client.keyboard.hold("Control_L"):
            vnc_client.keyboard.press("a")

Or alternatively, if you want to use the key mappings found here:
https://github.com/barneygale/asyncvnc/blob/main/asyncvnc.py#L21

with vnc_client.keyboard.hold("Ctrl"):
            vnc_client.keyboard.press("a")

I can see such presses on an VNC server running a Qt application. The Ctrl key modifier is caught.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants