JSFiddle - React, Tailwind, and code Playground

HTML

<input  type="text" id="i" />

JavaScript

$(document).ready(function(){
    $('#i').keydown(function(event){
                    alert(event.which);
     } );
});