Skip to content

Instantly share code, notes, and snippets.

@fokklz
Created February 6, 2023 08:19
Show Gist options
  • Save fokklz/7251db5f347aec7e1e745a2366b31ecd to your computer and use it in GitHub Desktop.
Save fokklz/7251db5f347aec7e1e745a2366b31ecd to your computer and use it in GitHub Desktop.
import keyboard
import time
import pydirectinput
time.sleep(6)
print('Gooo!')
pydirectinput.keyDown('w')
pydirectinput.keyDown('shift')
while True:
if keyboard.is_pressed('q'): # if key 'q' is pressed
pydirectinput.keyUp('w')
pydirectinput.keyUp('shift')
break # finishing the loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment