import keyboard while not keyboard.ispressed("s"): print("none") if keyboard.ispressed("s"): print("bottun pressed!")