📅  最后修改于: 2022-03-11 14:46:28.932000             🧑  作者: Mango
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()