When using .keydown I can capture keydown event, then check and prevent default action (display the character).
When using .keyup I cannot?
In keyup event the character has been typed and can't be undone but in keydown nothing has been typed and the browser has intent to type the character, so you can cancel the browser intent.
Whenever you type a character the following events occur:
keydown --> keypress repeatedly until the key is released --> keyup
keydown -> can be prevented -> fired when press a keykeypress -> can be prevented -> fired when hold a keykeyup -> cannot be prevented -> fired when release a key