Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python pynput letter key pressed

from pynput import keyboard

def on_press(key):
    if key.char == 'a': # here you can choose the letter you want to get detected
        print("You pressed A")

with keyboard.Listener(on_press=on_press) as listener:
    listener.join()
 
PREVIOUS NEXT
Tagged: #python #pynput #letter #key #pressed
ADD COMMENT
Topic
Name
6+8 =