I have a program which uses keyboard.add_hotkey() and keyboard.wait() to listen for a specific hotkey (CTRL + Space in my case), and then run a function.
It works fine normally, but putting my laptop to sleep makes the hotkey listener stop, and it no longer does anything when I send the shortcut. The only way to get it to work again is to restart the entire program.
I have a program which uses keyboard.add_hotkey() and keyboard.wait() to listen for a specific hotkey (CTRL + Space in my case), and then run a function.
It works fine normally, but putting my laptop to sleep makes the hotkey listener stop, and it no longer does anything when I send the shortcut. The only way to get it to work again is to restart the entire program.