Skip to content

Instantly share code, notes, and snippets.

@Kjuly
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kjuly/970554ac6c777100fe26 to your computer and use it in GitHub Desktop.
Save Kjuly/970554ac6c777100fe26 to your computer and use it in GitHub Desktop.
iOS external keyboard action, like RETURN button of the external keyboard, code sample below
- (NSArray *)keyCommands
{
return @[[UIKeyCommand keyCommandWithInput:@"\r"
modifierFlags:0
action:@selector(didPressExternalKeyboardReturnButton)]];
}
- (void)didPressExternalKeyboardReturnButton
{
// do ur action here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment