JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="Blah" id='1'/>
<input type="text" value="Blah2" id='2'/>
<input type="text" value="" id='3'/>

JavaScript

$(function(){
   $('#2').trigger('focus');
   $('#2').trigger('blur');
   $('#3').trigger('focus');
   
    //'a' should appear in the third input
   $('#3').trigger(jQuery.Event('keypress', {which: 65}));
});