Skip to main content
Participating Frequently
November 18, 2020
Answered

Using keystroke event listeners in actions

  • November 18, 2020
  • 1 reply
  • 356 views

Hi, I'm using Animate 2020 and don't see any documentation on using keystroke event listeners within actions to accept user input at runtime, can anyone help? 

For example, I would like the user to be able to jump forward in the timeline to specific labeled frames by pressing the right arrow.

    This topic has been closed for replies.
    Correct answer kglad

    document.onkeydown = f.bind(this);
    function f(e){
    console.log(e.key);
    }

    1 reply

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    November 18, 2020

    document.onkeydown = f.bind(this);
    function f(e){
    console.log(e.key);
    }

    Participating Frequently
    December 1, 2020

    Perfect, thanks

    kglad
    Community Expert
    Community Expert
    December 1, 2020

    you're welcome.