Handle cut, paste, undo, and other changes that avoid onkeypress