Photoshop CC Scripting: Arrows keys' 'keydown' Events don't get fired

  • 2
  • Problem
  • Updated 4 years ago
  • (Edited)
Run the following script and press arrow-up, arrow-down, arrow-left, arrow-right.
If you target ESTK, the Console correctly outputs "Up", "Down", "Left", "Right".
If you target Photoshop (CC, OSX), no 'keydown' Events are fired resulting in empty Console.

<code>

var win = new Window('dialog');
win.lbx = win.add('listbox', undefined, undefined, {items:['First Item', 'Second Item', 'Third Item', 'Fourth Item', 'Fifth Item']});
win.lbx.children[0].selected = true;
win.lbx.active = true;

var keydownHandler = function(event) {
$.writeln("-----------")
$.writeln(event.keyName);
}

win.lbx.addEventListener('keydown', keydownHandler);
win.show();
Photo of Davide Barranca

Davide Barranca

  • 21 Posts
  • 3 Reply Likes

Posted 5 years ago

  • 2
Photo of Michael Serafin

Michael Serafin

  • 6 Posts
  • 0 Reply Likes
I'm having the same issue within Bridge CC.