@Override
        public void keyReleased(KeyEvent e) {

            if (isWaitingForKeyPress() || consoleInputField != null) {
                return;
            }

            /* Movement controls */
            if (e.getKeyCode() == KeyEvent.VK_LEFT) {
                leftPressed = false;
                leftPressedMs = 0;
                nextSprite = 0;
            }
            if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
                rightPressed = false;
                rightPressedMs = 0;
                nextSprite = 0;
            }
            if (e.getKeyCode() == KeyEvent.VK_UP) {
                upPressed = false;
            }
            if (e.getKeyCode() == KeyEvent.VK_DOWN) {
                downPressed = false;
            }
            if (e.getKeyCode() == KeyEvent.VK_SHIFT) {
                shiftPressed = false;
            }
            if (e.getKeyCode() == KeyEvent.VK_Z) {
                zPressed = false;
            }
            if (e.getKeyCode() == KeyEvent.VK_X) {
                xPressed = false;
            }
        } //end method keyReleased