JSFiddle - React, Tailwind, and code Playground
HTML
<a id="left" href="http://qbn.com">QBN (left)</a>
<br />
<a id="right" href="http://zombo.com">Zombo (right)</a>
JavaScript
$(document).ready(function () {
$("body").keydown(function(e) {
if(e.which == 37) { // left
$("#left")[0].click();
}
else if(e.which == 39) { // right
$("#right")[0].click();
}
});
$("#left").on("click", function(){
return true;
});
});