That is unless you only use keyup and don't ever use key down or key press (if that's how you want your code to funciton).
If suitibly motivated you could even override those events as shown above for key up and ensure that the key down or key press events aren't used at all.