spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
980 stars 145 forks source link

how can I stop keyboard.Listener from grabbing all keyboard input even when it doesn't hold focus? #466

Open pootle opened 1 year ago

pootle commented 1 year ago

I'm running the listener like this: with keyboard.Listener(on_press=on_press, on_release=on_release, suppress=True) as listener: but it grabs all keyboard input, blocking out other apps, until the with block ends. 'I'm doing a push to talk' type of app, and I need suppress True to stop echoing spacebar autorepeating.

Is there a way to allow other apps to use the keyboard when they are given focus?

Im running on Ubuntu with sounddevice version 0.4.6

mgeier commented 1 year ago

keyboard.Listener is not part of the sounddevice module.

You should probably ask at the issue tracker of the keyboard module?