KeyboardMaestro is $36, Hammerspoon can do roughly the same and is free. Best part is: there is no pendant in linux, mostly due to the moving target of system configurations and DEs.
I've never heard that word used this way, thank you!
That said, that makes sense. I don't have experience with AHK or HammerSpoon, but I'd expect this functionality to be very dependent on the display server and overall desktop environment.