键盘事件

from pynput.keyboard import Listener

def press(key):
      print(key.char)

with Listener(on_press = press) as listener:
        listener.join()

 

posted @ 2020-08-01 07:30    阅读(106)  评论(0编辑  收藏  举报