Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对dot键和delete键的事件处理错误 #659

Open
JeckFS opened this issue Oct 30, 2024 · 0 comments
Open

对dot键和delete键的事件处理错误 #659

JeckFS opened this issue Oct 30, 2024 · 0 comments

Comments

@JeckFS
Copy link

JeckFS commented Oct 30, 2024

按下delete键也会响应dot键,反之也存在。总之这两个键相互纠缠,并没有区分

import keyboard 
import pyautogui
import time

def press_dot(e):
    print('press dot: ')
    # keyboard.write('.')
    pyautogui.write(".")
    keyboard.release('shift')

# keyboard.add hotke
keyboard.on press key( 'dot', press_dot)


def press_del(e):
    keyboard.on_press_key('del',press_del)

keyboard.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant