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

keyboard.suppress blocks keyboard.is_pressing #628

Open
S0meM opened this issue Jan 31, 2024 · 0 comments
Open

keyboard.suppress blocks keyboard.is_pressing #628

S0meM opened this issue Jan 31, 2024 · 0 comments

Comments

@S0meM
Copy link

S0meM commented Jan 31, 2024

When you hook a function with suppress=True, and the function is using keyboard.is_pressing() with any value, it returns false.
This is what I mean:
`
import keyboard

def keys(event):
if event.event_type == keyboard.KEY_DOWN:
if keyboard.is_pressed('a'):
print('You are pressing A')
else:
print('You are not pressing A')

keyboard.hook(keys, suppress=True)

while True:
continue
`

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