private bool IsOurDevice(InputAction.CallbackContext ctx) { // no input unless we have focus if (!Application.isFocused) { return(false); } return(_gamepadListener.IsOurGamepad(ctx) || // ignore keyboard/mouse while the debug menu is open // TODO: this probably doesn't handle multiple keyboards/mice (!DebugMenuManager.Instance.Enabled && (Keyboard.current == ctx.control.device || Mouse.current == ctx.control.device))); }