使用(NSArray *)keyCommands
我能够获取所有字母数字字符,符号等的关键事件。我已尝试通过继承UIApplication
并覆盖(NSArray *)keyCommands method
-(NSArray *)keyCommands{
UIKeyCommand *cmdF1 = [UIKeyCommand keyCommandWithInput:[NSString stringWithFormat:@"%c",asciicode] modifierFlags:0 action:@selector(handleShortcut:)];
........
return @[cmdF1,cmdF2....];
}
在我的应用程序中,我需要在我的应用程序中使用F1到F12键按下,还有Home,End,PageUp按键。有没有任何公共API可以这样做?我们可以使用其他蓝牙服务连接键盘吗?