JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" />

JavaScript

$('input').keypress(function(e){
    console.log(e.which)
});