When I run this code:
import keyboard def function_that_checks_if_q_is_pressed(): if keyboard.read_key()=="q": print(True) while True: