连接蓝牙输入设备时显示软键盘(iPad)
我真的很头疼,因为当有蓝牙输入设备连接到 iPad 时,我找不到显示软键盘的方法。我在网上做了一些搜索,结果如下:
- stackoverflow 上的一个问题,答案很简短 如何检测 iPad 上是否存在外部键盘?
- 由 erica Sadun 为 cydia env 开发的应用程序 http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on -screen-keyboard/
Erica 说,诀窍是回答系统“没有连接硬件键盘”。 我尝试为 UIKeyboardImpl 编写一个类别,并覆盖:
- (BOOL)isInHardwareKeyboardMode {
DEBUG(@"is called");
return NO;
}
但到目前为止我还没有获得任何东西。调用了重写的方法,但没有软键盘。 埃里卡还说该应用程序通过动态链接工作,但我不知道如何实现它。我不需要进入 AppStore,因为这是一个私人应用程序,所以我不用担心被拒绝。
提前致谢
I'm really bangin' my head because I can't find the way to show the soft keyboard when there's a bluetooth input device connected to the iPad. I made some search on the web and this is the result:
- a question on stackoverflow with a very short answer How can I detect if an external keyboard is present on an iPad?
- an application developed by erica sadun for the cydia env http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/
Erica said that the trick is to answer to the system that "There's no hardware keyboard attached".
I tried to write a category for UIKeyboardImpl and I overrided:
- (BOOL)isInHardwareKeyboardMode {
DEBUG(@"is called");
return NO;
}
But until now I haven't obtained anything. The overrided method is called but there's no soft keyboard.
Erica also said the application works by dynamic linking but I don't know how can I accomplish it. I don't need to be in the AppStore because this is a private application so I don't bother about rejection.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的。终于明白了。非常感谢大卫、马蒂亚斯和恩里科。步骤如下:
添加一个通过调用切换键盘的按钮
添加一个按钮,通过调用I've find this function on http://code.google.com/p/btstack/wiki/iPhoneKeyboardHiding
现在我可以同时从软键盘和蓝牙设备获取输入。
Ok. Finally got it. Many thanks to David, Matthias and Enrico. Here are the steps:
add a button that toggles the keyboard by calling
I've found this function on http://code.google.com/p/btstack/wiki/iPhoneKeyboardHiding
Now I can take input from the soft keyboard and from the bluetooth device at the same time.
要使用苹果键盘绕过它,您可以按弹出键。也许您可以实现发送弹出键码的操作?我认为 iSSH 有一个功能,即使连接了蓝牙键盘,您也可以点击屏幕键盘图标来调出它。
To get around it using the apple keyboard you hit the eject key. Perhaps you can implement an action that sends the eject keycode? I think iSSH has a feature where you can tap the onscreen keyboard icon to bring it up even when a bluetooth keyboard is connected.