Skip to main content
Participant
December 9, 2009
Question

Capture key press events with ExtendScript?

  • December 9, 2009
  • 1 reply
  • 2314 views

Is it possible to do this?  I can't find an example in the documentation or online anywhere.  I'd really like to know when the user presses the arrow keys while viewing the slideshow in Bridge.

Thanks!

This topic has been closed for replies.

1 reply

Participant
December 9, 2009

This is the only other post I've managed to find on this: http://forums.adobe.com/message/2450448#2450448

Paul Riggott
Inspiring
December 9, 2009

If you have CS4 have a look at the Image Processor script in the presets/scripts folder. You will find the keyboard event handler. It may be of use.

P.S. It's at the bottom of the script.

Participant
December 10, 2009

Thanks for the example Paul.  I can see how to listen to key down events on Windows and Dialogs that I create.  Do you know of way to listen for global (app-wide) key down events? These are not defined:

app.addEventListener('keydown',...)

app.document.addEventListener('keydown',...)

I'm trying to add to the slideshow mode by having a little palette dialog with the context information shown that I need.  The default caption box doesn't have what our artists want.  If the palette window is in focus, I get the keydown event, but if they're using the arrow keys to flip through the slideshow, I can't capture those.

Thanks for the help.