KeyboardShortcut
Keyboard shortcuts describe combinations of keys on a keyboard that the user can press in order to activate a button or toggle.
Declaration
type KeyboardShortcut =
| 'cancelAction'
| 'defaultAction'
| { key: KeyEquivalent; modifiers?: EventModifiers; }
| { key: KeyEquivalent; modifiers?: EventModifiers; localization: KeyboardShortcutLocalization; };struct KeyboardShortcutPass a literal, or build one with SwiftUI.KeyboardShortcut from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'cancelAction'SwiftUI.KeyboardShortcut.cancelActionThe standard keyboard shortcut for cancelling the in-progress action or dismissing a prompt, consisting of the Escape (⎋) key and no modifiers.
'defaultAction'SwiftUI.KeyboardShortcut.defaultActionThe standard keyboard shortcut for the default button, consisting of the Return (↩) key and no modifiers.
Used by
See also
More in Input and interaction.
- ButtonRepeatBehaviorThe options for controlling the repeatability of button actions.
- KeyboardShortcutLocalizationOptions for how a keyboard shortcut participates in automatic localization.
- PencilPreferredActionAn action that the user prefers to perform after double-tapping their Apple Pencil.
- SensoryFeedbackRepresents a type of haptic and/or audio feedback that can be played.
- SensoryFeedbackFlexibilityThe flexibility to be represented by a type of feedback.
- SensoryFeedbackPressFeedbackFeedback that can be played in response to a press (touch down) on a control.
- SensoryFeedbackReleaseFeedbackFeedback that can be played in response to a release (touch up) of a control.
- SensoryFeedbackWeightThe weight to be represented by a type of feedback.