JSFiddle - React, Tailwind, and code Playground
by Apple Ilagan
HTML
Control key: <span class="ctrlKey"></span><br/>
Shift key: <span class="shiftKey"></span><br/>
Alt key: <span class="altKey"></span><br/>
Key code: <span class="keyCode"></span>
JavaScript
$('body').keypress(function(e) {
e.preventDefault();
$('.ctrlKey').html(e.ctrlKey);
$('.shiftKey').html(e.shiftKey);
$('.altKey').html(e.altKey);
$('.keyCode').html(e.which);
return false;
});