So I'm trying to make a program that does stuff when I press a key, here's the code right now:
import keyboard import pyautogui while True: if keyboard.is_pressed('f8'): pyautogui.typewrite("h")
It works except when I type something or press many buttons at the same time it causes input lag, is there a way I can fix that or change the program so its not constantly scanning? (I assume that's why its lagging) Thanks
2.1m questions
2.1m answers
60 comments
57.0k users