---
title: KeyPress.Phases
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/keypress/phases
---

# KeyPress.Phases

Options for matching different phases of a key-press event.

## Declaration

```swift
struct Phases
```

## Topics

### Getting the phases

- [down](swiftui/keypress/phases/down.md)
- [up](swiftui/keypress/phases/up.md)
- [repeat](swiftui/keypress/phases/repeat.md)
- [all](swiftui/keypress/phases/all.md)

## Relationships

### Conforms To

- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Getting the phase of the keypress

- [phase](swiftui/keypress/phase.md)
