Listen to both 'keypress' and 'input' events to accommodate versions of Android/Chrome that do not properly fire the 'keypress' event.