NoriginMedia / Norigin-Spatial-Navigation

React Hooks based Spatial Navigation (Key & Remote Control Navigation) / Web Browsers, Smart TVs and Connected TVs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I use 'setKeyMap'?

KrooCiso opened this issue · comments

Hello,
I want to use the remote control's 'back' button with a keycode of 10009.
How can I use 'setKeyMap' to configure it?
Where should this 'setKeyMap' be placed to make it work?
Can you provide a simple example?

Hi.

This method can be called as soon as you initialize the navigation with init.

Documentation: https://github.com/NoriginMedia/Norigin-Spatial-Navigation#setkeymap
You can assign one or multiple key codes to the directions or enter handlers.