private void key(char c) {
        switch (c) {
            // Use ESCAPE to exit
            case KeyEvent.VK_ESCAPE:
                running = false;
                // TODO interrupt?
                break;
            // Use SPACE to toggle pause
            case ' ':
                paused = !paused;
                break;
            // Use TAB to switch view mode
            case '\t':
                synchronized (lock) {
                    if (renderer instanceof Renderer.Isometric)
                        renderer = new Renderer.Orthogonal();
                    else
                        renderer = new Renderer.Isometric();
                }
                break;
            // Use + to zoom
            case '+':
                synchronized (lock) {
                    dcamr /= 1.4f;
                }
                break;
            // Use - to unzoom
            case '-':
                synchronized (lock) {
                    dcamr *= 1.4f;
                }
                break;
            // Use '*' to increase speed
            case '*':
                speed *= 2;
                break;
            // Use '/' to decrease speed
            case '/':
                speed /= 2;
                break;
            // Use '=' to reset camera and time
            case '=':
                synchronized (lock) {
                    Board board = simulator.getGame().getBoard();
                    dcamx = (board.getMax().getX() - board.getMin().getX()) * 0.5f;
                    dcamy = (board.getMax().getY() - board.getMin().getY()) * 0.5f;
                    dcamr = 2 * (float)Math.sqrt(dcamx * dcamx + dcamy * dcamy);
                    dcamx += board.getMin().getX();
                    dcamy += board.getMin().getY();
                    speed = 2;
                }
                break;
            // TODO arrows to move camera
        }
    }