JSFiddle - React, Tailwind, and code Playground
JavaScript
document.onkeydown = testKeyEvent;
document.onkeypress = testKeyEvent
document.onkeyup = testKeyEvent;
function testKeyEvent(e) {
if (e.keyCode == 18) {
alert ("hi");
//document.body.style.cursor = 'default';
}
}