Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to specify a key to be as a break fomction python

pip install keyboard

import keyboard

while True:
    # do something
    if keyboard.is_pressed("q"):
        print("q pressed, ending loop")
        break
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #key #break #fomction #python
ADD COMMENT
Topic
Name
7+5 =