Skip to main content

Input Hot-Swap State Tester

Clarify how UI modes should flip when players swap between keyboard/mouse and controller.

Toggle co-op, disconnect, and debounce options to surface edge cases before you lock UX. See Steam Deck UX checker.

// Pseudocode: last-used device → UI glyph set
float lastSwitchTime;
void OnInputEvent(InputDevice d) {
  bool pad = d is Gamepad || d is Joystick;
  if (Time.unscaledTime - lastSwitchTime < 0.12) return;
  if (pad != usingGamepadUI) {
    usingGamepadUI = pad;
    RefreshPrompts();
    lastSwitchTime = Time.unscaledTime;
  }
}
Does this run inside Unity?
No — it is a planning aid. Implement detection with Input System user device change callbacks or your own polling.