https://api.jquery.com/keypress/
The event signatures both say "keyup" instead of "keypress":
.on( "keyup" [, eventData ], handler )
.trigger( "keyup" )
Seems to have been introduced in the last revision when .keypress() and similar methods were deprecated