SolidJSS
SolidJSโ€ข3y agoโ€ข
15 replies
Bersaelor

onKeyPress event

Hello there, I'm trying to capture key-presses to make a gallery go left/right with the arrow keys.

In react I would do:
<div tabIndex="0" onKeyPress={(e) => console.log("onKeyPress: ", e)}></div>

yet, when I do that in solidjs I don't see anything printed in the console.
I must be missing something really simple, can anyone help me out?
Was this page helpful?