editor: Only delete on backspace key released

Do not delete two characters when key is pressed and released.