PHOTOSHOP CC 2015 - HTML5 Panel problem with capturing enter key

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
I can't capture enter key on my HTML5 panel. Whenever I click enter it activates value field on top bar of Photoshop and my plugin is becoming inactive.

I'm capturing it like this:

$(window).keydown(function(e){

var keyCode = e.which;

if (keyCode == 13) {
//code
}

});

How can I do that? It broke my plugin, which is used by thousands of users and it's really critical for me! I need help with that ASAP.
Photo of Paweł Magiera

Paweł Magiera

  • 13 Posts
  • 0 Reply Likes
  • frustrated

Posted 3 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 818 Reply Likes
Which version of Photoshop are you using?
Which OS version?
Photo of Paweł Magiera

Paweł Magiera

  • 13 Posts
  • 0 Reply Likes
Cc2015 on Mac. Also I have just discovered, that I can only capture enter while textarea is active.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 818 Reply Likes
Correct, otherwise nothing in your panel is targeted, and you will not receive the event.
Photo of Paweł Magiera

Paweł Magiera

  • 13 Posts
  • 0 Reply Likes
But what about input? Why it doesn't work?