Is there a way to detect a change in Control Scheme with the new Input System?

Basically just what the title says. I’m wanting to detect when the player switches between a gamepad and a keyboard/mouse but I can’t find any reference to the current control scheme anywhere.

I didn’t find it either, so I just check the name of the current control scheme in the update loop like that:

private void Update()
 {
      switch (input.currentControlScheme)
      {
          case "MouseScheme:
              DoSmthWithMouse();
              break;
          case "GamepadScheme":
               DoSmthWithGamepad();
               break;
      }
}

Or actually, you can raise some event when you detected that the name of the current control scheme has changed. It’s not elegant, but works for me.