Try to avoid writing directly to an elements `onkeypress` attribute, as this prevents multiple events from being bound to the same event handler.