7

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!

Nv7
  • 406
  • 6
  • 20

1 Answers1

12

The keyword for command is just command.

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

Documentation

martineau
  • 119,623
  • 25
  • 170
  • 301
Loocid
  • 6,112
  • 1
  • 24
  • 42
  • 1
    Oh! I actually saw that but my eyes died before I got to the end. Why such fine print?!?!? – Nv7 Jun 05 '19 at 01: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 05 '19 at 01:31
  • Yeah I know I found it I just thought it wouldn't be in the documentation not sure why – Nv7 Jun 07 '19 at 02:13