Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Capture key press events with ExtendScript?

New Here ,
Dec 09, 2009 Dec 09, 2009

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!

TOPICS
Scripting
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 09, 2009 Dec 09, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 09, 2009 Dec 09, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 10, 2009 Dec 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 10, 2009 Dec 10, 2009
LATEST

Sorry I don't, I wonder if you have had a look at "Script Events Manager.jsx"? It sounds as this is what you need but for Bridge.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines