<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Gesture/modifiers(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI7GesturePAAE9modifiersyAA010_ModifiersC0VyxGAA05EventE0VF"
  },
  "title" : "modifiers(_:)"
}
-->

# modifiers(_:)

Combines a gesture with keyboard modifiers.

```
@MainActor @preconcurrency func modifiers(_ modifiers: EventModifiers) -> _ModifiersGesture<Self>
```

## Parameters

`modifiers`

A set of flags that correspond to the modifier
keys that the user needs to hold down.

## Return Value

A new gesture that combines a gesture with keyboard
modifiers.

## Discussion

The gesture receives updates while the user presses the modifier keys
that correspond to the given modifiers option set.

---

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)