keyboard icon indicating copy to clipboard operation
keyboard copied to clipboard

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

Open superDMS opened this issue 1 year ago • 3 comments

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?

superDMS avatar Jul 29 '24 07:07 superDMS

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 avatar Dec 05 '24 05:12 JoanthanWu

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

JoanthanWu avatar Dec 05 '24 06:12 JoanthanWu

Are there any solution for this issue?

quic-zhanweiw avatar Oct 18 '25 10:10 quic-zhanweiw