JSFiddle - React, Tailwind, and code Playground

HTML

Enter any Char in this textbox : <input type='text' id='inp' />
<div id='output'></div>

JavaScript

$(function(){
    $('input#inp').keyup(function(e){
        $(this).val(String.fromCharCode(e.keyCode)); //Gets char value for any key code
        $('div#output').html('Keycode : ' + e.keyCode);
    });
});