You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was an issue that occurred in my Windows 10 22H2 environment, and I fixed it.
In pynput, when you press an alphabet key while holding down the control key, control characters (\x01 to \x1a) are detected. (The control key is detected properly, but the additional pressed alphabet key is recognized as a control character.)
The program's default setting is Control+Shift+Spacebar. Also, when an unknown character is detected, it defaults to the spacebar. Because of this, I realized that pressing Control, Shift, and any alphabet key triggers the activation function automatically.
So, I temporarily resolved the issue by adding control characters to the keymap.
(I think this issue might only be happening to me (other Windows users haven't reported similar issues — why?), and since I consider the code I added to be a temporary fix, I'm leaving it as an issue here instead of submitting a pull request.)
I added the following entries to the dictionary at /src/key_listener.py:815.
It was an issue that occurred in my Windows 10 22H2 environment, and I fixed it.
In pynput, when you press an alphabet key while holding down the control key, control characters (\x01 to \x1a) are detected. (The control key is detected properly, but the additional pressed alphabet key is recognized as a control character.)
The program's default setting is Control+Shift+Spacebar. Also, when an unknown character is detected, it defaults to the spacebar. Because of this, I realized that pressing Control, Shift, and any alphabet key triggers the activation function automatically.
(
Here are some related questions I found through my search
https://stackoverflow.com/questions/65167647/how-can-i-detect-ctrlc-in-python3-8
https://stackoverflow.com/questions/77618988/python-pynput-keyboardtracking-ctrl-second-key-doesnt-output-second-key
moses-palmer/pynput#202
)
So, I temporarily resolved the issue by adding control characters to the keymap.
(I think this issue might only be happening to me (other Windows users haven't reported similar issues — why?), and since I consider the code I added to be a temporary fix, I'm leaving it as an issue here instead of submitting a pull request.)
I added the following entries to the dictionary at
/src/key_listener.py:815
.The text was updated successfully, but these errors were encountered: