JSFiddle - React, Tailwind, and code Playground

by frogggeee McFrogggeee

JavaScript

document.onkeydown = testKeyEvent;
    document.onkeypress = testKeyEvent
    document.onkeyup = testKeyEvent;

    function testKeyEvent(e) {

        if (e.keyCode == 18) {
        alert ("hi");
        //document.body.style.cursor = 'default';
        
        }
    }