Closed 4ov closed 3 years ago
Yes I'm in favour of this 👍 - I'll play around some implementations. Feel free to open a PR
You can also do something like -
await pilot.toggleKey("alt", true);
await pilot.toggleKey("tab", true);
await pilot.toggleKey("alt", false);
await pilot.toggleKey("tab", false);
Let me know if it works for you, it'll be nice to have a wrapper method around toggleKey
May I know how to operate hot key like "Ctrl + C" ?
await pilot.toggleKey("ctrl", true);
await pilot.toggleKey("c", true);
await pilot.toggleKey("ctrl", false);
await pilot.toggleKey("c", false);
Closing, the above example should be used.
@littledivy await pilot.toggleKey("c", false);
is not possible currently, because only specific keys are allowed with toggleKey
.
Is your feature request related to a problem? Please describe. I can't switch between two windows, switch language or doing anything using hotkeys.
Describe the solution you'd like add hotkey method like pyautogui
hotkey('alt', 'tab')
.