Handle backspace and delete.