📅  最后修改于: 2022-03-11 14:45:28.838000             🧑  作者: Mango
# in command prompt, type "pip install pynput" to install pynput.
from pynput.keyboard import Key, Controller
keyboard = Controller()
key = "a"
keyboard.press(key)
keyboard.release(key)