Fix exception in a keypress handler. This is non-critical, since I'm 99.9% sure that this code is utterly useless.