private void handleKeyEvent(KeyEvent keyEvent) {
        switch (keyEvent.getID()) {
            case KeyEvent.KEY_TYPED:
                handleKeyTypedEvent(keyEvent);
                break;
            case KeyEvent.KEY_PRESSED:
                handleKeyPressedEvent(keyEvent);
                break;
            case KeyEvent.KEY_RELEASED:
                handleKeyReleasedEvent(keyEvent);
                break;
            default:
                throw new AssertionError();
        }
    }