<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCMouse/DidDisconnectMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Game Controller",
      "GameController"
    ],
    "preciseIdentifier" : "s:So7GCMouseC14GameControllerE20DidDisconnectMessageV"
  },
  "title" : "GCMouse.DidDisconnectMessage"
}
-->

# GCMouse.DidDisconnectMessage

A message that posts after a mouse accessory disconnects from the
device.

```
struct DidDisconnectMessage
```

## Overview

Use the `didDisconnect` identifier with `NotificationCenter` to listen
for this message.

```
let observation = NotificationCenter.default.addObserver(of: GCMouse.self, for: .didDisconnect) { message in
   let mouse = message.mouse
}
```

## Topics

### Initializers

[`init(mouse: GCMouse)`](/documentation/GameController/GCMouse/DidDisconnectMessage/init(mouse:))

### Instance Properties

[`var mouse: GCMouse`](/documentation/GameController/GCMouse/DidDisconnectMessage/mouse)

The mouse object that disconnected from the device.

## Relationships

### Conforms To

[`MainActorMessage`](/documentation/Foundation/NotificationCenter/MainActorMessage)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)