I'm writing a script to control a specific application with hotkeys. I divided my task into three tasks:
monitor for global keys,
match pressed global hotkeys to keys to be sent,
send keys to specific application.
Let's say i want to send Ctrl+A to Notepad.exe when i press Ctrl+F3 from anywhere. It's important that the application (notepad in this case) i want to control will not be in focus before i press hotkeys and after it.
I suppose task 3 is about to work with pywinauto and it's keyboard.SendKeys. Task 2 is not difficult. But i have no idea how to monitor (in cycle? depending on keyboard events?) for global hotkeys.