JSFiddle - React, Tailwind, and code Playground

HTML

<input id="i" type="text" /><br />
<input id="j" type="text" />
<input id="k" type="text" />

JavaScript

$('#i').keydown(function() {
    document.getElementById('j').value = "down";
    $('#k').val($('#i').val())
});

$('#i').keyup(function() {
    document.getElementById('j').value = "up";
    $('#k').val($('#i').val())
});

$('#i').keypress(function(event) {
    $('#k').val(String.fromCharCode(event.keycode);
});

$('#i').change(function() {
    document.getElementById('j').value = "change";
});