---
title: modifierFlags
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsevent/modifierflags-swift.property
---

# modifierFlags

An integer bit field that indicates the pressed modifier keys.

## Declaration

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

## Discussion

Discussion You can examine individual flag settings using the C bitwise AND operator with the predefined key masks described in Getting Unicode Values. The lower 16 bits of the modifier flags are reserved for device-dependent bits.

## See Also

### Getting modifier flags

- [NSEvent.ModifierFlags](appkit/nsevent/modifierflags-swift.struct.md)
- [modifierFlags](appkit/nsevent/modifierflags-swift.type.property.md)
