JSFiddle - React, Tailwind, and code Playground

HTML

<button id="botao">Sou um botão</button>

JavaScript

function fazAlgumaCoisa() {
	// a funçãoq que será executada em ambos os casos
	window.alert('Alguma coisa!');
}

$(document).keyup(function(event){
	if (event.keyCode === 13) {
  	$('#botao').click();
  }
});

$(document).on('click', '#botao', fazAlgumaCoisa);