JSFiddle - React, Tailwind, and code Playground
HTML
<input id="stackoverflow" />
JavaScript
$('input').bind('keydown', function() {
alert('hi');
});
var e = jQuery.Event("keydown");
e.which = 65; // # Some key code value
$("input").trigger(e);