asyncvnc icon indicating copy to clipboard operation
asyncvnc copied to clipboard

Shift Button does not register

Open chrisszbond opened this issue 1 year ago • 1 comments

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)

chrisszbond avatar Apr 24 '24 09:04 chrisszbond

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.

inqrphl avatar Jan 13 '25 14:01 inqrphl