Handle backspace, delete and enter.