Closed stuartflanagan closed 4 years ago
Hi,
I have tried to reproduce this issue and I couldn't. I passed custom key map where I "inverted" left and right codes and it is fine. We are also using this feature on some projects where TV devices provide different key codes from a "default" browser ones. Can you provide more details about which environment and device you're working on? Do you have a possibility to debug it with "debug: true" and see what is the direction of the navigation?
setKeyMap works for us if we use:
// Optional
setKeyMap({
'ArrowLeft': 9001,
'ArrowUp': 9002,
'ArrowRight': 9003,
'ArrowDown': 9004,
'Enter': 9005
});
Is there documentation on what property names are valid for the key map?
Sorry for the confusion. You are correct and this is working as intended.
Describe the bug Documentation implies that initialising the library and setting a key map should be done with the following property names from: https://github.com/NoriginMedia/react-spatial-navigation#initialization
Using these name value pairs does not seem to work.
Expected behavior Should be able to set a device specific key map for left, right, up, down & enter.