Skip to main content
Participating Frequently
November 18, 2020
Answered

Using keystroke event listeners in actions

  • November 18, 2020
  • 3 replies
  • 371 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 is closed to new replies. Start a new post to keep the conversation going.
    Correct answer kglad

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

    3 replies

    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.