JSFiddle - React, Tailwind, and code Playground
by Kaleb Hornsby
HTML
<label><input type="text" name="text" /> text</label>
CSS
label{display:block;}
JavaScript
// Dev console should be open to view events
function log(event, group) {
return function(e) {
window.console.log(
'%s \nkeyCode: %s, which: %s, charCode: %s,\nshift: %s, ctrl: %s, alt: %s, meta: %s,\nchar: %s, key: %s\n%O',
e.type, e.keyCode, e.which, e.charCode, e.shiftKey, e.ctrlKey, e.altKey, e.metaKey, e.char, e.key, e);
}
}
$(':input').on({
keydown: log(),
keypress: log(),
keyup: log(),
change: log()
});