8

I am messing around with PyAutoGUI, and I am learning about the hotkey function. I want it to press Command+R, but I can't find the keyword (like control becomes ctrl). What is it?

I am using Pycharm. I am fully aware that this would lead to a forever loop.

I am learning from this tutorial.

Thanks for help!

1 Answer 1

13

The keyword for command is just command.

So pyautogui.hotkey('command', 'r') should work fine.

Documentation

3
  • 1
    Oh! I actually saw that but my eyes died before I got to the end. Why such fine print?!?!?
    – Nv7
    Jun 5, 2019 at 1:06
  • FWIW, most browsers have some way of searching for a string, so you could have searched for "command" and found it fairly quickly.
    – martineau
    Jun 5, 2019 at 1:31
  • Yeah I know I found it I just thought it wouldn't be in the documentation not sure why
    – Nv7
    Jun 7, 2019 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.