Creates and returns a new key command object that matches the specified input and has a title.
- iOS 9.0–13.0Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–13.0Deprecated
The keys that must be pressed by the user. The string must contain one or more characters corresponding to the keys that were 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 must be pressed. You can use this parameter to specify which modifier keys (Command, Option, and so on) must also be pressed by the user. 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 string that can be displayed to the user to explain the purpose of the key command.
The initialized key command object.