@Override
        public void keyTyped(KeyEvent e) {
            if (consoleInputField != null) {
                /* User can enter backspaces. */
                if (e.getKeyChar() == (char) 8 && consoleInputField.getCmd().length() > 0) {
                    String nev = consoleInputField.getCmd();
                    nev = nev.substring(0, nev.length() - 1);
                    consoleInputField.setCmd(nev);
                } else {
                    consoleInputField.appendCmd("" + e.getKeyChar());
                }

            }

            /*
            * If game is paused, see if a key was pressed
            * If it was, unpause (Well technically restart) the game
            */
            else if (isWaitingForKeyPress()) {
                if (pressCount == 1) {
                    waitForKeyPressEnd();
                    startGame();
                    pressCount = 0;
                } else {
                    pressCount++;
                }
            }

            /*
            * If escape is pressed, exit the game unless the
            * console is open. If it is, close the console
            */
            if (e.getKeyChar() == 27) {
                if (consoleInputField != null) {
                    removeGui(consoleInputField);
                    consoleInputField = null;
                } else {
                    System.exit(0);
                }
            }
        }