JSFiddle - React, Tailwind, and code Playground

HTML

<script language="javascript">
document.onkeydown = function my_onkeydown_handler(e) {
    switch (e.keyCode) {
        case 112: // 'F1'      
            e.preventDefault();
             e.returnValue = false; // for IE
            alert("F1");
            //NewEntry();
            return false;            
    }
}
</script>