Added unit tests for KeyHandler.isPressed.