JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text">

JavaScript

$('input').on('keydown keypress', function (event) {
    if ($.inArray(event.which,  [9, 38, 40, 13]) > -1) {
        console.log('Preventing', event.which, event.type);
        event.preventDefault();
        return false;
    }
});