---
title: GCMouse.DidConnectMessage
framework: gamecontroller
role: symbol
role_heading: Structure
path: gamecontroller/gcmouse/didconnectmessage
---

# GCMouse.DidConnectMessage

A message that posts after a mouse accessory connects to the device.

## Declaration

```swift
struct DidConnectMessage
```

## Overview

Overview Use the didConnect identifier with NotificationCenter to listen for this message. let observation = NotificationCenter.default.addObserver(of: GCMouse.self, for: .didConnect) { message in    let mouse = message.mouse } Connections of mouse accessories will be reflected in the mice array of the GCMouse class when the message posts.

## Topics

### Initializers

- [init(mouse:)](gamecontroller/gcmouse/didconnectmessage/init(mouse:).md)

### Instance Properties

- [mouse](gamecontroller/gcmouse/didconnectmessage/mouse.md)

## Relationships

### Conforms To

- [NotificationCenter.MainActorMessage](foundation/notificationcenter/mainactormessage.md)
- [SendableMetatype](swift/sendablemetatype.md)
