JSFiddle - React, Tailwind, and code Playground

HTML

<input id="whichkey" value="type something">
<div id="log"></div>

JavaScript

$(document.body).bind('keydown',function(e){ 
  $('#log').html(e.type + ': ' +  e.which );
});