Contents

GCMouse

An object that represents a physical mouse connected to a device.

Declaration

class GCMouse

Overview

To get a mouse object and its input values, register for the GCMouseDidConnect (Swift) or GCMouseDidConnectNotification (Objective-C) notification for when a mouse connects to the device. Then register for the GCMouseDidBecomeCurrent (Swift) or GCMouseDidBecomeCurrentNotification (Objective-C) notification for when it becomes the current mouse. Alternatively, use the current class property or the mice() class method to get a mouse object. Then get the current input values from the mouse object’s mouseInput controller profile.

Topics

Discovering mouse devices

Handling multiple mouse devices

Getting input values

Structures

See Also

Game controllers