JSFiddle - React, Tailwind, and code Playground

by kasdega

HTML

<textarea id="myBigText"></textarea>

JavaScript

$(document).ready(function() {
    $("#myBigText").keydown(function(evt) {
        evt = evt || window.event;
        var charCode = evt.which || evt.keyCode;
        if(charCode == 38) {
            alert("This is the up arrow key");
        } else {
            alert("This is not the up arrow");
        }
    });
});