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

What is Framer? Join the Community
Return to index
Ben Ellis
Posted Sep 09 - Read on Facebook

Hi there,

Please forgive my limited knowledge of coffeeScript, but does anyone know if you can bind a keyboard event to a layer in Framer rather than the window or document? Basically I want to bind an event on artboard1 e.g. left arrow key, and then go to artboard 2. Then on artboard 2 have a new set of keyboard event handlers to do different stuff i.e. left arrow press would go to artboard 3.

Hope that makes sense, thanks in advance.

Ben

2 Comments

Jonas Treub

Its probably easiest to create a so called state machine which passes the key events to the active part (artboard) of your prototype. I'll create you an example.

Jonas Treub

Here I use the state of a PageComponent (its currentPage) to respond to the keydown event: http://share.framerjs.com/055rmt29wdkl/

Read the entire post on Facebook