Neutralino.js - Input event handler not registering

201 views Asked by At

I am trying to detect user key input using javascript. However, the console log seemed to show nothing to which I decided to log the event key instead which didn't log anything either.

Here's a snippet of code from my main.js file:

document.addEventListener("keypress", function onEvent(event) {
    console.log(event.key);
});

There are no errors at all, just a blank console. I am using neutralino.js for my project.

The same code seems to work in firefox, with just the index html file and the main javascript file.

0

There are 0 answers