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

suppress=True will cause a 1-second delay when pressing Ctrl, ALT, and other keys separately, such as running the ALT key in games #652

Open
superDMS opened this issue Jul 29, 2024 · 2 comments

Comments

@superDMS
Copy link

suppress=True will cause a 1-second delay when pressing Ctrl, ALT, and other keys separately, such as running the ALT key in games`````how to do?

@JoanthanWu
Copy link

JoanthanWu commented Dec 5, 2024

I have the same problem.
The key shift I detected was a delay in the original shift key function.
Do you know who can help us?

keyboard.add_hotkey('shift+tab', alt_handler, suppress=True, timeout=0.01, trigger_on_release=False)

detail:
When I ran the following code, shift+tabThis combination of Hotkeys is registered.

import keyboard
def alt_handler():
    print("Hotkey triggered!")
keyboard.add_hotkey('shift+tab', alt_handler, suppress=True, timeout=0.01, trigger_on_release=False)
keyboard.wait('esc')

I'll press the shift button alone, but there's a delay in the original function of this shift key from Windows.

This late performance can be seen in text selection using the Shift key.

@JoanthanWu
Copy link

I have the same problem. The key shift I detected was a delay in the original shift key function. Do you know who can help us?

        keyboard.add_hotkey('shift+a', alt_handler, suppress=True, trigger_on_release=True)

I'm reading this website. He's got something about suppression. Support for key suppression

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

2 participants