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
1.4m articles
1.4m replys
5 comments
57.0k users