Creates a new key command object that matches the specified input.
- iOS 7.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The keys that the user must press. The string must contain one or more characters corresponding to the keys the user pressed. For a list of special characters that do not have a textual representation, see Input Strings for Special Keys.
The bit mask of modifier keys that the user must press. You can use this parameter to specify which modifier keys (Command, Option, and so on) the user must also press. You may specify more than one modifier key. For a list of possible values, see
The action method to execute on the responder object.
A newly initialized key command object.
After creating a key command object, you can: