Page 1 of 1

Capturing a keystroke from within a window?

Posted: February 13th, 2013, 8:23 pm
by cswaim
I've got an idea for a script and I'm not sure if it's even possible in AE. I want to open up a new window and whenever the window is active, the user, using certain keystrokes, can do different things to selected layers, etc. I can figure out the layer operation logic but I'm not sure if AE even has a way to capture keystrokes within the code.

Is there a way to do that (similar to document.onkeypress)? Any help with be greatly appreciated!!!

Re: Capturing a keystroke from within a window?

Posted: February 14th, 2013, 2:18 am
by Klustre
Have a look at page 75 from the Script UI for Dummies pdf: http://www.kahrel.plus.com/indesign/scriptui.html
And page 119 of the javascript tools guide cs6. The thing you want to look for is addEventListener.

Good luck! Oh, and please post your progress. Very much interested if this works!