Invoke function through Key Press Event
In Photoshop, it is possible to assign up to about 44 actions and 34 scripts to shortcuts. Once they have shortcuts, they can be acessed through AutoHotkey easily, but those without shortcuts cannot. To work around this, I have been trying to produce JavaScripts that would stay open permanently, with specific functions being invoked upon keypress events. It seems it could be done with eventListener, but I found nothing on how to implement it in Photoshop successfully. Here is a general format:
(...).addEventListener("keydown", function(event) {
if (event.keyCode == 65) {
app.doAction("actionName", "actionGroup");;
}
});
