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

What is Framer? Join the Community
Return to index
Mary Evdjukian
Posted Dec 14 - Read on Facebook

Hi Framers! I am pretty new to Framer. I made a new event listener for "key down" right arrow on your keyboard, and I need it to work exclusively with a dropdown layer (when exposed) in my project. I am using the same "key down" right arrow event listener on the main document for a different function.

Basically in the main document the "key down" right arrow key lets you cycle through videos and in the top drop down menu (which is exposed with the "key down" up arrow key), the same 'key down' right arrow function lets you cycle through tiles.

The problem I am having is that the "key down" right arrow key is moving both the tiles in the drop down menu and the cycling through the videos of the main document.

i did give them two separate eventlisteners but they are firing at the same time. How do I have one only fire during when the dropdown is exposed.

1 Comments

Krijn Rijshouwer

Hey Mary! Based on your explanation I think that you can just use an if statement in the event listener to verify if the dropdown is active.

Also using a different event listener for the same event will still trigger both because they are bound to the same event.

Here's a quick example that covers your question :) → http://share.framerjs.com/j9igmzgz41ho/

Read the entire post on Facebook