JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" id="foo">test</a>
JavaScript
jQuery(function($) {
$("a#foo").keydown(function() {
alert("keyboard");
return false;
}).click(function() {
alert("mouse");
return false;
})
})