renative
renative copied to clipboard
Webos 05.10.30 - Hello World template keyEvent issue !
I'm updated my renative project (androidtv, webos), version 0.28.17 to the 0.28.21. To understand the new spacial navigation library, i tried to build the helloword template in a real LG webos device with a new software(05.10.30), and i can't have the keydown event working at all.
I added log in the spacialNavifation js file and in the emulator i can log some event, but no action are dispatched. In the real device, using the webos ide to debug... no log at all...
I have no error the server side, no error in the front...
Is Webos fully supported in 0.28.21 version, drawerNavigation for example ? Thx anyway for your job !
Any update for this question ? I'm maybe doing things wrong ! thx anyway
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@numericgraphics sorry about late response here. snowed with tasks recently.
rnv 0.29.0
and latest 0.30.0
added support for '@noriginmedia/react-spatial-navigation'
if you check hello world example there and see if it works for you.
Also here is a quick debug UI snippet which would allow you to debug key strokes:
const KeyDebug = () => {
const [lastKeyCode, setLastKeyCode] = useState('');
useEffect(() => {
window.addEventListener('keydown', (e) => {
setLastKeyCode(e.keyCode);
});
}, []);
return (
<View style={{
width: 300, height: 50, position: 'absolute', bottom: 0, right: 0, backgroundColor: 'white', justifyContent: 'center', padding: 20
}}
>
<Text style={{ fontSize: 20 }}>
{`Last Key: ${lastKeyCode}`}
</Text>
</View>
);
};
you can then add it to src/app/index.web.js
:
const App = () => (
<View style={[themeStyles.app]}>
<Menu focusKey="menu" navigate={navigate} />
<View style={styles.container}>
<Router>
<ScreenHome path="/" />
<ScreenMyPage path="my-page" />
<ScreenModal path="modal" />
</Router>
</View>
<KeyDebug />
</View>
);
Result should look like this:
Am also facing the same issue the keyEvent is not getting triggered on webos using rnv version 30.0.4 any updated on the support for webos
Hi @anudeepjusanu, sorry for late reply, if this issue is still relevant, please could you try again with updating to the latest version?
0.37.1 has working key events for webos, therefore closing, if you find any issues please reopen