-
AddEventListener goofy behavior
I’m attempting to port Rob’s Timecode Calculator to work as a dockable Script UI window, but I’m having trouble getting the addEventListener to work properly. Just creating a simple window with a static text field to show the keyName, and the plus and asterisk keys register as undefined, regardless if I am using the keyName or keyIdentifier property. Here’s the code:
var win = (this instanceof Panel) ? this : new Window("palette", "Test", undefined, {resizeable: true});
this.windowRef = win;var txt = win.add("statictext", undefined, "00:00:00;00");
win.addEventListener("keydown", function(k){ txt.text = k.keyName });win.show();
It works in ESTK, but has no effect in AE CS6 (Mac). Barring getting the adEventListener functionality working in AE, it seems odd that Adobe’s version of Javascript can’t recognize the ASCII codes being passed by the keyboard.
I’m assuming that it’s an Operator Error (ID 10T), and any help would be greatly appreciated.
Sorry, there were no replies found.