Copy link to clipboard
Copied
Is it possible to do something like this? So if Cmd + O are pressed, it gets triggered?
Nevermind, figured it out:
dlg.addEventListener ("keydown", function (k) {keyListen(k)});
function keyListen(k){
if(ScriptUI.environment.keyboardState.metaKey && k.keyName == "O"){
// do something
return;
}
}
It works, but for some reason my Mac emits the alert sound as soon as it's finished. Anyone know why?
Copy link to clipboard
Copied
Nevermind, figured it out:
dlg.addEventListener ("keydown", function (k) {keyListen(k)});
function keyListen(k){
if(ScriptUI.environment.keyboardState.metaKey && k.keyName == "O"){
// do something
return;
}
}
It works, but for some reason my Mac emits the alert sound as soon as it's finished. Anyone know why?