JSFiddle - React, Tailwind, and code Playground

HTML

<input id="presser" type="text" value="Press Here" />

JavaScript

$('body').bind('keydown', function (e) {
    console.log(e.which);
});