fernandojsg / aframe-input-mapping-component

https://fernandojsg.github.io/aframe-input-mapping-component
MIT License
24 stars 7 forks source link

[Question] using ArrowKey #29

Closed arpu closed 6 years ago

arpu commented 6 years ago

How can i set the ArrowKeys?

for the keyboard mapping

netpro2k commented 6 years ago

Keyboard mappings are based on KeyboardEvent.key values. You can see a list here https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values

Take the KeyboardEvent.key value from there, lowercase it, and add "_key". For example, the up arrow key is ArrowUp so you would add arrowup_key to your input mapping.

arpu commented 6 years ago

Thanks a lot for this Information. Works perfect!