Closed SpecialCharacter closed 8 months ago
Thank you for your report.
As you note, this is not a bug report but rather a documentation request. I applied Python formatting to your example to be able to read it, but I am afraid that I cannot really make any sense of the code.
However, providing a value for darwin_intercept
incurs no more overhead than calling that function, so I will hazard a guess that any slowdown you notice is caused by that code.
Thank you for taking a look!
The question was if the "if echo ... else:
" slows the process down (I have to suppress every second input because I have two listeners and so every input is doubled).
Edit: I have to do this for every character and punctuation, which I imagine slows the process down. Or can I put the "if echo ... else:
" before all the if chars ==
?
Description Not really a bug but more a request for best practice. I have two Listeners (on_press and on_release), so every input is doubled and I have to discard every second input (echo = True/False vs echo = chars). However, this seems to slow down the program. Is there any way to speed this up? Or is it the fact that the program has to go through the whole alphabet before it can accept new input? How to remediate? Should Quartz be imported immediately? (PS: I need two Listeners so I am aware when more than one key is pressed.)
Platform and pynput version MacOS Catalina 10.15.7 pynput version unknown
To Reproduce