pynput icon indicating copy to clipboard operation
pynput copied to clipboard

What means "key <0> released"?

Open SpecialCharacter opened this issue 2 years ago • 6 comments

Description Occasionally, pynput informs me "key <0> released". What does it mean? A key that is not on the physical keyboard? How can I create an AttributeError for that? if key == <0>: gives an error.

Platform and pynput version MacOS Catalina 10.15.7 pynput version unknown

To Reproduce I use the standard pynput.keyboard.Listener according to "Monitoring the keyboard".

SpecialCharacter avatar Jun 26 '22 14:06 SpecialCharacter

The script claims it is still active, but following the "key <0> released" message, it does not execute anything.

SpecialCharacter avatar Jun 27 '22 08:06 SpecialCharacter

OK, so apparently this event can appear if you are typing faster than the script can handle your input. No big deal, but is it possible to account for that without ruining my script...?

SpecialCharacter avatar Jun 28 '22 22:06 SpecialCharacter

Anyone? Am I the only one that has problems with "key <0> released"?

SpecialCharacter avatar Jun 05 '23 21:06 SpecialCharacter

Does this happen when you do not press a key, or are key pressed corrupted?

moses-palmer avatar Jun 05 '23 22:06 moses-palmer

When I press the same key continuously.

I think this indicates that I am creating input faster than the script can handle it.

Is there a way to fix this? Like creating a buffer or artificially limiting the keystrokes?

Once "key <0> released" is encountered, the script goes into a zombie state where it is still running but not executing.

Am 06.06.2023 um 00:37 schrieb moses-palmer:

Does this happen when you do not press a key, or are key pressed corrupted?

— Reply to this email directly, view it on GitHub https://github.com/moses-palmer/pynput/issues/481#issuecomment-1577574381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHLRJE6GOGKV3C4FXOFEFDLXJZNTFANCNFSM5Z4BQCLA. You are receiving this because you authored the thread.Message ID: @.***>

SpecialCharacter avatar Jun 05 '23 22:06 SpecialCharacter

Any update on this? We are encountering the same issue.

abrichr avatar Jan 26 '24 16:01 abrichr