Search code examples
pythonkeyboardsendkeyspywinauto

pywinauto keyboard.sendkeys(). Send the equivalent of holding down several keys at the same time


How do I use pywinauto keyboard to send {LWIN} {SHIFT} {S} all a the same time keyboard.send_keys('{LWIN}+{S}) types an S into the windows search box. I want to do the equivalent of hold win key hold shift key hold s key all down simultaneously which causes the snip it function to start up. Thank you in advance


Solution

  • Try:

    keyboard.send_keys("{LWIN down}""{VK_LSHIFT down}""s""{VK_LSHIFT up}""{LWIN up}")