NUI - Detecting when a key is pressed?

I’m pretty sure you can’t do that at the minute. There’s a feature request somewhere for the devs to implement a proper key library.

You may be able to set the focus on a blank HTML page and use the keydown (I think its keydown) event in js to get your desired key.

Edit:
You can use jquery post to send the data back to Lua. Look here: