JSFiddle - React, Tailwind, and code Playground

HTML

<input id="the-input"></input>

JavaScript

document.getElementById("the-input").oninput = function(evt) {
    console.log("the input event handler is called", evt);
}

document.getElementById("the-input").onchange = function(evt) {
    console.log("the change event handler is called", evt);
}

document.getElementById("the-input").onkeydown = function(evt) {
    console.log("the keydown event handler is called", evt);
}

document.getElementById("the-input").onkeypress = function(evt) {
    console.log("the keydown event handler is called", evt);
}

document.getElementById("the-input").onkeyup = function(evt) {
    console.log("the keyup event handler is called", evt);
}