Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using keystroke event listeners in actions

Community Beginner ,
Nov 18, 2020 Nov 18, 2020

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.

325
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 18, 2020 Nov 18, 2020

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

Translate
Community Expert ,
Nov 18, 2020 Nov 18, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 01, 2020 Dec 01, 2020

Perfect, thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2020 Dec 01, 2020
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines