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

# NSEvent.EventSubtype

Subtypes for various types of events.

```
enum EventSubtype
```

## Overview

The event subtype contains one of these constants only when the event’s [`type`](/documentation/AppKit/NSEvent/type) property contains [`NSAppKitDefined`](/documentation/AppKit/NSAppKitDefined), [`NSSystemDefined`](/documentation/AppKit/NSSystemDefined), or [`NSApplicationDefined`](/documentation/AppKit/NSApplicationDefined) or a mouse-related event type.

## Topics

### Getting AppKit Event Subtypes

These subtypes apply when the event type is [`NSEventTypeAppKitDefined`](/documentation/AppKit/NSEvent/EventType/appKitDefined)

An AppKit-related event occurred..

[`NSEventSubtypeApplicationActivated`](/documentation/AppKit/NSEvent/EventSubtype/applicationActivated)

An app-activation event occurred.

[`NSEventSubtypeApplicationDeactivated`](/documentation/AppKit/NSEvent/EventSubtype/applicationDeactivated)

An app-deactivation event occurred.

[`NSEventSubtypeScreenChanged`](/documentation/AppKit/NSEvent/EventSubtype/screenChanged)

An event that indicates a window changed screens.

[`NSEventSubtypeWindowExposed`](/documentation/AppKit/NSEvent/EventSubtype/windowExposed)

An event that indicates a window’s contents are visible again.

[`NSEventSubtypeWindowMoved`](/documentation/AppKit/NSEvent/EventSubtype/windowMoved)

An event that indicates a window moved.

### Getting System Event Subtypes

This subtype applies when the event type is [`NSEventTypeSystemDefined`](/documentation/AppKit/NSEvent/EventType/systemDefined)

A system-related event occurred..

[`NSEventSubtypePowerOff`](/documentation/AppKit/NSEvent/EventSubtype/powerOff)

An event that indicates a system shutdown or restart operation is in progress.

[`NSEventSubtypePowerOff`](/documentation/AppKit/NSEvent/EventSubtype/powerOff)

An event that indicates a system shutdown or restart operation is in progress.

### Getting Other Subtypes

[`NSEventSubtypeMouseEvent`](/documentation/AppKit/NSEvent/EventSubtype/mouseEvent)

A mouse event occurred.

[`NSEventSubtypeTabletPoint`](/documentation/AppKit/NSEvent/EventSubtype/tabletPoint)

A tablet-pointer event occurred.

[`NSEventSubtypeTabletProximity`](/documentation/AppKit/NSEvent/EventSubtype/tabletProximity)

A tablet-proximity event occurred.

[`NSEventSubtypeTouch`](/documentation/AppKit/NSEvent/EventSubtype/touch)

A touch event occurred.

### Deprecated

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

An event type used to support Java applications.

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

The application has been activated.

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

The application has been deactivated.

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

Indicates a purely mouse event.

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

Specifies that the user is turning off the computer.

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

An NSWindow has changed screens.

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

Indicates a tablet-pointer event; see description of `NSTabletPoint`.

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

Indicates a tablet-proximity event; see description of `NSTabletProximity`.

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

Indicates a touch event subtype.

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

A non-retained NSWindow has been exposed.

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

An NSWindow has moved.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)