This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Ricardo Pedroso
Posted Feb 25 - Read on Facebook

Hey. I'm doing a kind of a form on framer and I'm wondering if I can simulate on framer the "tab" key, like pressing "tab" and move to the next field. Does anyone know if this is possible? Implement keyboard listeners? Thanks!

2 Comments

Benjamin Den Boer

Hey Ricardo Pedroso — you can detect any keyboard presses by adding eventListeners for the "keydown" event. Then, you can check which key is being pressed, and do something if it matches the key you'd like to detect. Here's how you can detect tab key presses: http://share.framerjs.com/sk8yshv4u35o/

Also, in case you'd like to detect more keys in the future, be sure to check out this list of all keyCodes: https://css-tricks.com/snippets/javascript/javascript-keycodes/ — it's really useful to keep at hand. :-)

Ricardo Pedroso

New question: I was trying to put a listener on "enter" key, but this key actually makes a refresh on the prototype...Do you know why? Thank you.

Read the entire post on Facebook