public static KeyboardInput keyEventToKeyboardInput(KeyEvent e) {
        switch (e.getKeyCode()) {
            case KeyEvent.VK_UP:
                return KeyboardInput.UP;
            case KeyEvent.VK_DOWN:
                return KeyboardInput.DOWN;
            case KeyEvent.VK_LEFT:
                return KeyboardInput.LEFT;
            case KeyEvent.VK_RIGHT:
                return KeyboardInput.RIGHT;
            case KeyEvent.VK_W:
                return KeyboardInput.W;
            case KeyEvent.VK_A:
                return KeyboardInput.A;
            case KeyEvent.VK_S:
                return KeyboardInput.S;
            case KeyEvent.VK_D:
                return KeyboardInput.D;
            default:
                return null;
        }
    }