A function is triggered when the user is pressing a key in the input field.
onkeyPress event ↓
onkeyPress event ↓
onkeyup and onkeydown event ↓