JSFiddle - React, Tailwind, and code Playground

JavaScript

$("body").keydown(function(e){
    alert("keydown: "+e.which);
    e.preventDefault();
});

$("body").keypress(function(e){
    alert("keypress: "+e.which);
    e.preventDefault();
});