JSFiddle - React, Tailwind, and code Playground

HTML

<input class="auto" type="text">

JavaScript

$('.auto').one('keyup', function(e) {
    $(this).val(String.fromCharCode(e.keyCode));
});