---
title: "modifiers(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/gesture/modifiers(_:)"
---

# modifiers(_:)

Combines a gesture with keyboard modifiers.

## Declaration

```swift
@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

Return Value A new gesture that combines a gesture with keyboard modifiers.

## Discussion

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