title: How do I detect a keypress event with PyAutoGUI?
body: <p>How do I use PyAutoGUI to detect a keypress event? In my research, I could not make an example in this model:</p>
  
  <pre><code>import pyautogui
  
  num = 0
  if pyautogui.press('b'): # I know the right thing is not to use the press, but, what do I put in place?
      num = 1
  </code></pre>