📅  最后修改于: 2022-03-11 14:45:19.498000             🧑  作者: Mango
# keyboard module
# windows: pip install keyboard
# mac: pip3 install keyboard
import keyboard as k
if k.is_pressed("a"):
# if the a key is pressed by the user
print("You have pressed the key 'a'")