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

What is Framer? Join the Community
Return to index
Blaine Billingsley
Posted Jun 17 - Read on Facebook

Is there a way to receive keyCode events for command and alt/option keys? It seems that framer uses those for itself.


Benjamin Den Boer

Hiya Blaine Billingsley — sure thing. You can listen to the "keydown" event and then check for the matching keyCodes. See this little example:

Blaine Billingsley

Benjamin Den Boer thanks dude! so simple.

Blaine Billingsley

For anyone else who stumbles across this: I couldn't get this to work with using Events.wrap(window).addEventListener. document.addEventListener (like in Benjamin's example) did work!

Read the entire post on Facebook