如何在iOS应用程序中添加对蓝牙键盘支持的支持

时间:2014-12-15 07:27:54

标签: ios bluetooth keyboard

使用(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可以这样做?我们可以使用其他蓝牙服务连接键盘吗?

0 个答案:

没有答案