📜  如何在 python 代码示例中进行按键感应

📅  最后修改于: 2022-03-11 14:45:25.405000             🧑  作者: Mango

代码示例1
import keyboard, time

# Continuously check if 'c' key is pressed

while True:
  if keyboard.is_pressed('c'):
    print('The c key was pressed')