luke-chang / js-spatial-navigation

A javascript-based implementation of Spatial Navigation.
Mozilla Public License 2.0
370 stars 117 forks source link

Making it work on WebOS for app development #57

Open Kax675 opened 1 year ago

Kax675 commented 1 year ago

I tried using it with webos sdk (while developing application for webos, you are developing with html css and js), I didn't get any error in console but navigation didn't work at all. Can you help?

KotKarol commented 1 year ago

@Kax675 Key events are not the same on the webOS as they are in your browser. For me the easiest way of making this lib work on webOS, was forking and adjusting it to accept different keycodes at the init, and overwrite the ones hardcoded in the lib.

rolodato commented 1 year ago

@KotKarol Would you mind sharing that fork? I'm looking to get this working well on both webOS and regular browsers.

Kax675 commented 1 year ago

@Kax675 Key events are not the same on the webOS as they are in your browser. For me the easiest way of making this lib work on webOS, was forking and adjusting it to accept different keycodes at the init, and overwrite the ones hardcoded in the lib.

I couldn't even get the keydown event listener to work

KotKarol commented 1 year ago

@rolodato https://gist.github.com/KotKarol/3d9b0856073405fb581410f9c06dd0f8