JSFiddle - React, Tailwind, and code Playground
by huppen
HTML
<button id="test" type="text" />TEXT</button>
JavaScript
e = jQuery.Event("keypress")
e.which = 13 //choose the one you want
$("#test").keypress(function(){
alert('keypress triggered')
}).trigger(e)