1

TLDR: Whats the best way to send keystroke to other windows without losing focus on the current window using python?

Im using python to replace the macros and other functions I used to have on windows using AHK.

Im already using pyxhook, and keyboard to get and send keystrokes. Next step would be to make the script aware of what windows are opened. E.g Chrome on a youtube video, or Firefox on Netflix, or simply know that spotify is currently playing a song.

Is there any libraries I can use on python to get the names of all the active windows in my desktop on linux?

What would be the best way to control open windows on python?(get titles, or send keystrokes without losing focus on the window Im using). I havent found anything that would allow me to do that on linux. A lot of stuff for windows win32, dragonfly, etc but nothing for linux.

Also any other recommendations on libraries to get python to work as close as ahk would also be appreciated.

0 Answers0