Simplify use of keyboard.handleKeyEvent