<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSEvent/EventType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSEventType"
  },
  "title" : "NSEvent.EventType"
}
-->

# NSEvent.EventType

Constants for the types of events that responder objects can handle.

```
enum EventType
```

## Overview

These constants appear in the event’s [`type`](/documentation/AppKit/NSEvent/type) property. You also use them when you construct new events.

## Topics

### Getting Mouse-Related Event Types

[`NSEvent.EventType.leftMouseDown`](/documentation/AppKit/NSEvent/EventType/leftMouseDown)

The user pressed the left mouse button.

[`NSEvent.EventType.leftMouseDragged`](/documentation/AppKit/NSEvent/EventType/leftMouseDragged)

The user moved the mouse while holding down the left mouse button.

[`NSEvent.EventType.leftMouseUp`](/documentation/AppKit/NSEvent/EventType/leftMouseUp)

The user released the left mouse button.

[`NSEvent.EventType.rightMouseDown`](/documentation/AppKit/NSEvent/EventType/rightMouseDown)

The user pressed the right mouse button.

[`NSEvent.EventType.rightMouseUp`](/documentation/AppKit/NSEvent/EventType/rightMouseUp)

The user released the right mouse button.

[`NSEvent.EventType.rightMouseDragged`](/documentation/AppKit/NSEvent/EventType/rightMouseDragged)

The user moved the mouse while holding down the right mouse button.

[`NSEvent.EventType.otherMouseDown`](/documentation/AppKit/NSEvent/EventType/otherMouseDown)

The user pressed a tertiary mouse button.

[`NSEvent.EventType.otherMouseDragged`](/documentation/AppKit/NSEvent/EventType/otherMouseDragged)

The user moved the mouse while holding down a tertiary mouse button.

[`NSEvent.EventType.otherMouseUp`](/documentation/AppKit/NSEvent/EventType/otherMouseUp)

The user released a tertiary mouse button.

[`NSEvent.EventType.mouseMoved`](/documentation/AppKit/NSEvent/EventType/mouseMoved)

The user moved the mouse in a way that caused the cursor to move onscreen.

[`NSEvent.EventType.mouseEntered`](/documentation/AppKit/NSEvent/EventType/mouseEntered)

The cursor entered a well-defined area, such as a view.

[`NSEvent.EventType.mouseExited`](/documentation/AppKit/NSEvent/EventType/mouseExited)

The cursor exited a well-defined area, such as a view.

### Getting Keyboard Event Types

[`NSEvent.EventType.keyDown`](/documentation/AppKit/NSEvent/EventType/keyDown)

The user pressed a key on the keyboard.

[`NSEvent.EventType.keyUp`](/documentation/AppKit/NSEvent/EventType/keyUp)

The user released a key on the keyboard.

### Getting Touch-Based Events

[`NSEvent.EventType.beginGesture`](/documentation/AppKit/NSEvent/EventType/beginGesture)

An event marking the beginning of a gesture.

[`NSEvent.EventType.endGesture`](/documentation/AppKit/NSEvent/EventType/endGesture)

An event that marks the end of a gesture.

[`NSEvent.EventType.magnify`](/documentation/AppKit/NSEvent/EventType/magnify)

The user performed a pinch-open or pinch-close gesture.

[`NSEvent.EventType.smartMagnify`](/documentation/AppKit/NSEvent/EventType/smartMagnify)

The user performed a smart-zoom gesture.

[`NSEvent.EventType.swipe`](/documentation/AppKit/NSEvent/EventType/swipe)

The user performed a swipe gesture.

[`NSEvent.EventType.rotate`](/documentation/AppKit/NSEvent/EventType/rotate)

The user performed a rotate gesture.

[`NSEvent.EventType.gesture`](/documentation/AppKit/NSEvent/EventType/gesture)

The user performed a nonspecific type of gesture.

[`NSEvent.EventType.directTouch`](/documentation/AppKit/NSEvent/EventType/directTouch)

The user touched a portion of the touch bar.

[`NSEvent.EventType.tabletPoint`](/documentation/AppKit/NSEvent/EventType/tabletPoint)

The user touched a point on a tablet.

[`NSEvent.EventType.tabletProximity`](/documentation/AppKit/NSEvent/EventType/tabletProximity)

A pointing device is near, but not touching, the associated tablet.

[`NSEvent.EventType.pressure`](/documentation/AppKit/NSEvent/EventType/pressure)

An event that reports a change in pressure on a pressure-sensitive device.

### Getting Other Input Types

[`NSEvent.EventType.scrollWheel`](/documentation/AppKit/NSEvent/EventType/scrollWheel)

The scroll wheel position changed.

[`NSEvent.EventType.changeMode`](/documentation/AppKit/NSEvent/EventType/changeMode)

The user changed the mode of a connected device.

### Getting System Event Types

[`NSEvent.EventType.appKitDefined`](/documentation/AppKit/NSEvent/EventType/appKitDefined)

An AppKit-related event occurred.

[`NSEvent.EventType.applicationDefined`](/documentation/AppKit/NSEvent/EventType/applicationDefined)

An app-defined event occurred.

[`NSEvent.EventType.cursorUpdate`](/documentation/AppKit/NSEvent/EventType/cursorUpdate)

An event that updates the cursor.

[`NSEvent.EventType.flagsChanged`](/documentation/AppKit/NSEvent/EventType/flagsChanged)

The event flags changed.

[`NSEvent.EventType.periodic`](/documentation/AppKit/NSEvent/EventType/periodic)

An event that provides execution time to periodic tasks.

[`NSEvent.EventType.quickLook`](/documentation/AppKit/NSEvent/EventType/quickLook)

An event that initiates a Quick Look request.

[`NSEvent.EventType.systemDefined`](/documentation/AppKit/NSEvent/EventType/systemDefined)

A system-related event occurred.

### Deprecated

[`NSLeftMouseDown`](/documentation/AppKit/NSLeftMouseDown)

A left mouse-down event.

[`NSLeftMouseUp`](/documentation/AppKit/NSLeftMouseUp)

A left mouse-up event.

[`NSRightMouseDown`](/documentation/AppKit/NSRightMouseDown)

A right mouse-down event.

[`NSRightMouseUp`](/documentation/AppKit/NSRightMouseUp)

A right mouse-up event.

[`NSOtherMouseDown`](/documentation/AppKit/NSOtherMouseDown)

An other mouse-down event.

[`NSOtherMouseUp`](/documentation/AppKit/NSOtherMouseUp)

An other mouse-up event.

[`NSMouseMoved`](/documentation/AppKit/NSMouseMoved)

A mouse-moved event.

[`NSLeftMouseDragged`](/documentation/AppKit/NSLeftMouseDragged)

A left mouse-dragged event.

[`NSRightMouseDragged`](/documentation/AppKit/NSRightMouseDragged)

A right mouse-dragged event.

[`NSOtherMouseDragged`](/documentation/AppKit/NSOtherMouseDragged)

An other mouse-dragged event.

[`NSMouseEntered`](/documentation/AppKit/NSMouseEntered)

A mouse-entered event.

[`NSMouseExited`](/documentation/AppKit/NSMouseExited)

A mouse-exited event.

[`NSCursorUpdate`](/documentation/AppKit/NSCursorUpdate)

A cursor-update event.

[`NSKeyDown`](/documentation/AppKit/NSKeyDown)

A key-down event.

[`NSKeyUp`](/documentation/AppKit/NSKeyUp)

A key-up event.

[`NSFlagsChanged`](/documentation/AppKit/NSFlagsChanged)

A flags-changed event.

[`NSAppKitDefined`](/documentation/AppKit/NSAppKitDefined)

An AppKit-defined event.

[`NSSystemDefined`](/documentation/AppKit/NSSystemDefined)

A system-defined event.

[`NSApplicationDefined`](/documentation/AppKit/NSApplicationDefined)

An app-defined event.

[`NSPeriodic`](/documentation/AppKit/NSPeriodic)

A periodic event.

[`NSScrollWheel`](/documentation/AppKit/NSScrollWheel)

A scroll-wheel event.

[`NSTabletPoint`](/documentation/AppKit/NSTabletPoint)

An event representing the current state of a tablet pointing device, including its location, pressure, and tilt.

[`NSTabletProximity`](/documentation/AppKit/NSTabletProximity)

An event representing the proximity of a pointing device to its tablet.



---

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)