iPhone/iPad app using keyboard shortcuts? -


With the availability of keyboards for the iPad and iPhone, it is now possible to add keyboard shortcuts to the app.

Is it possible to do this in an app? What are the related APIs?

Although this question is quite old, Apple has added support for keyboard-specific shortcuts in iOS 7. See the UIKit framework for special support for hardware keyboard shortcuts. There are high level steps for us:

  1. Use the static key Medium Input: Modifier Flex: Action: to make the code a code UIKeyCommand UIKeyCommand for the specified key with the Modifier on the Note that any keyboard shortcut (such as Command-C duplication) that will be handled by the system will not work. You will also pass an action selector which will be called during the use of keyboard shortcuts
  2. Associate your newly created UIKeyCommand with Responder Objects by returning from the Responder object KeyCam property
  3. When the key is pressed, your selector will be called.

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -