JSFiddle - React, Tailwind, and code Playground
by sramam
HTML
<!doctype html>
<html>
<body>
<div id="status"></div>
</body>
</html>
JavaScript
$(document).ready(function() {
$(document).bind('keypress' /* keyup keydown keypress'*/, function(e) {
if(e.keyCode === 65 || e.keyCode === 97) {
$('#status').append('<div>' + e.type + ' \'' + String.fromCharCode(e.keyCode) + '\' shift:' + e.shiftKey + ' charCode' + e.charCode + ' keyCode:' + e.keyCode + ' which:' + e.which + '<\/div>')
}
})
})