pynput官网复制下来的代码,运行时报错
AttributeError: 'GlobalHotKeys' object has no attribute '_event_filter'
想问问大佬们是咋回事
from pynput import keyboard
def on_activate_h():
print('<ctrl>+<alt>+h pressed')
def on_activate_i():
print('<ctrl>+<alt>+i pressed')
with keyboard.GlobalHotKeys({
'<ctrl>+<alt>+h': on_activate_h,
'<ctrl>+<alt>+i': on_activate_i}) as h:
h.join()