JSFiddle - React, Tailwind, and code Playground

HTML

<input id="asd" type="text"></input>

JavaScript

$('#asd').click(function() {
    $(this).val('huhu');
});

$('#asd').keydown(function(e) {
    if(e.which == 27) {
        e.preventDefault();
        return false;
    }
});

$('#asd').keyup(function(e) {
    if(e.which == 27) {
        e.preventDefault();
        return false;
    }
});

$('#asd').keypress(function(e) {
    if(e.which == 27) {
        e.preventDefault();
        return false;
    }
});