JSFiddle - React, Tailwind, and code Playground
HTML
<div id="feedback"></div>
<!--
Focus the "Result" window in the bottom right to capture keyboard input.
-->
JavaScript
var feedback = $('#feedback');
$("body")
.bind("keydown", function(e) {
feedback.html("keyDown " + e.keyCode + ".<br>Metakey is down: " + e.metaKey);
})
.bind("keyup", function(e) {
feedback.html("keyUp " + e.keyCode + ".<br>Metakey is down: " + e.metaKey);
});