title: python keyboard.press not working with other applicatons
body: <p>I have made a python script that presses space once a second so I can go AFK in games and not get kicked for being idle. I tested it in notepad and it works but when i open Minecraft or Roblox nothing happens.
  I did try looking for an answer but couldn't find anything</p>
  
  <pre><code>from pynput.keyboard import Key, Controller
  import time
  keyboard = Controller()
  
  
  while True:
      time.sleep(1)
      keyboard.press(' ')
      keyboard.release(' ')
  </code></pre>