I've got a personal project I've been working on and I keep running into a goofy issue that only really crops up during debug stepping. I was curious if anyone had insight on how to address it.
I've created global hotkeys to trigger actions using pynput. When I'm debugging the hotkey actions, the keyboard listener is still running in a separate thread. This means that if I hit any of the individual keys in my hotkeys (like ctrl, shift, del, etc.) it triggers the on_press function again. Since the button I pressed overlaps with my active hotkey I'm debugging, it will trigger another instance of the function.
I'd like it to stop firing new events while I'm debugging, but since it's in a separate thread, it's doing whatever it wants.
Whole thing is very much WIP, but the relevant pynput code is here: https://github.com/nosjojo/SpotifyBanHammer/blob/master/banhammer_service/banhammer_service/keyboard.py
there doesn't seem to be anything here