If you’re on Windows and don’t mind setting up a 3rd party script, AHK with this library should do the trick.