一、python小功能记录——监听键盘事件

1.监听键盘按键

from pynput.keyboard import Listener

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

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

 

posted @ 2019-04-10 15:42  清风神剑  阅读(11570)  评论(0编辑  收藏  举报