Using onkeyup for the keyEvent

If you clear your notepad using backspace it's not saved unless you press anything else afterwards.