JSFiddle - React, Tailwind, and code Playground

HTML

<div> Press the right arrow after clicking in this document </div>

JavaScript

$(document).keydown(function(e){
    if (e.which == 39) { 
       alert( "right arrow pressed" );
       return false;
    }
});