<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGEventType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@E@CGEventType"
  },
  "title" : "CGEventType"
}
-->

# CGEventType

Constants that specify the different types of input events.

```
enum CGEventType
```

## Overview

These constants are used:

- In the functions [`tapCreate(tap:place:options:eventsOfInterest:callback:userInfo:)`](/documentation/CoreGraphics/CGEvent/tapCreate(tap:place:options:eventsOfInterest:callback:userInfo:)) and [`tapCreateForPSN(processSerialNumber:place:options:eventsOfInterest:callback:userInfo:)`](/documentation/CoreGraphics/CGEvent/tapCreateForPSN(processSerialNumber:place:options:eventsOfInterest:callback:userInfo:)) to specify the events of interest for the new event tap.
- To indicate the event type passed to your event tap callback function.
- In the function [`init(mouseEventSource:mouseType:mouseCursorPosition:mouseButton:)`](/documentation/CoreGraphics/CGEvent/init(mouseEventSource:mouseType:mouseCursorPosition:mouseButton:)) to specify the type of mouse event.
- In the functions [`type`](/documentation/CoreGraphics/CGEvent/type) and [`CGEventSetType`](/documentation/CoreGraphics/CGEventSetType) to identify the event type.
- In the functions [`counterForEventType(_:eventType:)`](/documentation/CoreGraphics/CGEventSource/counterForEventType(_:eventType:)) and [`secondsSinceLastEventType(_:eventType:)`](/documentation/CoreGraphics/CGEventSource/secondsSinceLastEventType(_:eventType:)) to indicate the event type.

Note that tablet devices may generate mouse events with embedded tablet data, or tablet pointer and proximity events. Tablet mouse events allow tablets to be used with applications that are not tablet-aware.

## Topics

### Constants

[`CGEventType.null`](/documentation/CoreGraphics/CGEventType/null)

Specifies a null event.

[`CGEventType.leftMouseDown`](/documentation/CoreGraphics/CGEventType/leftMouseDown)

Specifies a mouse down event with the left button.

[`CGEventType.leftMouseUp`](/documentation/CoreGraphics/CGEventType/leftMouseUp)

Specifies a mouse up event with the left button.

[`CGEventType.rightMouseDown`](/documentation/CoreGraphics/CGEventType/rightMouseDown)

Specifies a mouse down event with the right button.

[`CGEventType.rightMouseUp`](/documentation/CoreGraphics/CGEventType/rightMouseUp)

Specifies a mouse up event with the right button.

[`CGEventType.mouseMoved`](/documentation/CoreGraphics/CGEventType/mouseMoved)

Specifies a mouse moved event.

[`CGEventType.leftMouseDragged`](/documentation/CoreGraphics/CGEventType/leftMouseDragged)

Specifies a mouse drag event with the left button down.

[`CGEventType.rightMouseDragged`](/documentation/CoreGraphics/CGEventType/rightMouseDragged)

Specifies a mouse drag event with the right button down.

[`CGEventType.keyDown`](/documentation/CoreGraphics/CGEventType/keyDown)

Specifies a key down event.

[`CGEventType.keyUp`](/documentation/CoreGraphics/CGEventType/keyUp)

Specifies a key up event.

[`CGEventType.flagsChanged`](/documentation/CoreGraphics/CGEventType/flagsChanged)

Specifies a key changed event for a modifier or status key.

[`CGEventType.scrollWheel`](/documentation/CoreGraphics/CGEventType/scrollWheel)

Specifies a scroll wheel moved event.

[`CGEventType.tabletPointer`](/documentation/CoreGraphics/CGEventType/tabletPointer)

Specifies a tablet pointer event.

[`CGEventType.tabletProximity`](/documentation/CoreGraphics/CGEventType/tabletProximity)

Specifies a tablet proximity event.

[`CGEventType.otherMouseDown`](/documentation/CoreGraphics/CGEventType/otherMouseDown)

Specifies a mouse down event with one of buttons 2-31.

[`CGEventType.otherMouseUp`](/documentation/CoreGraphics/CGEventType/otherMouseUp)

Specifies a mouse up event with one of buttons 2-31.

[`CGEventType.otherMouseDragged`](/documentation/CoreGraphics/CGEventType/otherMouseDragged)

Specifies a mouse drag event with one of buttons 2-31 down.

[`CGEventType.tapDisabledByTimeout`](/documentation/CoreGraphics/CGEventType/tapDisabledByTimeout)

Specifies an event indicating the event tap is disabled because of timeout.

[`CGEventType.tapDisabledByUserInput`](/documentation/CoreGraphics/CGEventType/tapDisabledByUserInput)

Specifies an event indicating the event tap is disabled because of user input.



---

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)