moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.77k stars 245 forks source link

What means "key <0> released"? #481

Open SpecialCharacter opened 2 years ago

SpecialCharacter commented 2 years ago

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 commented 2 years ago

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

SpecialCharacter commented 2 years ago

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 commented 1 year ago

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

moses-palmer commented 1 year ago

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

SpecialCharacter commented 1 year ago

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: @.***>

abrichr commented 7 months ago

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