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

What is Framer? Join the Community
Return to index
Ash Middleton
Posted Oct 10 - Read on Facebook

Hi guys
Might seem like a newbie question so bear with me! but I'm trying to scroll left, right, up and down through an application using the arrow keys. I need an active state on each component so you can tell it's been selected, then to revert back when I've moved to something else. I've found a few examples of working with keypress and indexes, but I can't seem to find what it is I'm looking for.
A little prod in the general direction of how to go up, down, left and right through some components would be fab! hope I've not been too vague aha

2 Comments

Dennis Kerzig

You can add an event-listener for "keydown", check if the arrow-keys are used and do your stuff :) See this example http://share.framerjs.com/df99bcpkiucs/

Andreas Wahlström

Dennis Kerzig happy to see my Layers module out in the wild! :) You can use Layers.get() to retrieve the first item instead of withName()[0] :)

Read the entire post on Facebook