4

I'm writing a script to control a specific application with hotkeys. I divided my task into three tasks:

  1. monitor for global keys,

  2. match pressed global hotkeys to keys to be sent,

  3. 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.

Developer Guy
  • 2,318
  • 6
  • 19
  • 37
Sona
  • 41
  • 1

0 Answers0