private void handleEvents(int keyCode) {

            switch (applicationState.getState()) {

                case ApplicationState.MAIN_MENU:
                    handleMainMenu(keyCode);
                    break;
                case ApplicationState.HELP:
                case ApplicationState.ABOUT:
                    handleHelpAndAbout(keyCode);
                    break;
                case ApplicationState.OPTIONS:
                    handleOptions(keyCode);
                    break;
                case ApplicationState.EXIT:
                    handleExit(keyCode);
                    break;
                case ApplicationState.METRONOME_STARTED:
                case ApplicationState.METRONOME_STOPPED:
                    handleMetronome(keyCode);
                    break;

            }
        }