Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions ExtendScript – Shift Click addEventListener

  • ExtendScript – Shift Click addEventListener

    Posted by James Ronan on June 9, 2016 at 7:58 pm

    Hey guys

    Been trying to add a shift click event to my button, I’ve found a few bits of info on the web but when I apply them to my script it doesn’t work…

    Within my dockable panel, this is what I’ve got so far:

    var myButtonCtrl = myPanel.grp.groupOne.mySolidPanel.myButton;

    myButtonCtrl.addEventListener ("click", function (k) {
    if (k.shiftKey) {
    alert("One");
    }else{
    alert("Two");
    }
    });

    Is there anything I’m doing wrong? If I do an .onClick it works perfectly.

    Thanks!

    James Ronan replied 9 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy