JSFiddle - React, Tailwind, and code Playground

by tymeJV

HTML

<input type='text' id='test'/>

JavaScript

$('body').keypress(function(e) {
    var keyEvent = jQuery.Event("keydown");
    keyEvent.which = e.which; // capture keycode value
    $("#test").trigger(keyEvent); //Change to whatever input you want to append to
});