<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSEvent/modifierFlags-swift.type.property",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSEvent(cpy)modifierFlags"
  },
  "title" : "modifierFlags"
}
-->

# modifierFlags

The currently pressed modifier keys.

```
class var modifierFlags: NSEvent.ModifierFlags { get }
```

## Return Value

A mask of the current modifiers using the values in `Modifier Flags`.

## Discussion

This returns the state of devices combined with synthesized events at the moment, independent of which events have been delivered via the event stream.

---

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)