JSFiddle - React, Tailwind, and code Playground

JavaScript

document.onkeypress = function(event){alert(event.key)};