renative icon indicating copy to clipboard operation
renative copied to clipboard

Webos 05.10.30 - Hello World template keyEvent issue !

Open numericgraphics opened this issue 4 years ago • 4 comments

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 !

numericgraphics avatar Apr 10 '20 15:04 numericgraphics

Any update for this question ? I'm maybe doing things wrong ! thx anyway

numericgraphics avatar Apr 15 '20 13:04 numericgraphics

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.

stale[bot] avatar Jun 14 '20 13:06 stale[bot]

@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:

Jun-24-2020 12-34-02

pavjacko avatar Jun 24 '20 10:06 pavjacko

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

anudeepjusanu avatar Sep 07 '20 10:09 anudeepjusanu

Hi @anudeepjusanu, sorry for late reply, if this issue is still relevant, please could you try again with updating to the latest version?

RosaryDarling avatar Jun 19 '23 13:06 RosaryDarling

0.37.1 has working key events for webos, therefore closing, if you find any issues please reopen

pauliusguzas avatar Aug 11 '23 13:08 pauliusguzas