Move the keystroke evaluation to the front of the boolean evaluation to take advantage of short-circuiting.