蓝牙 HID 设备iOS 文本字段

Bluetooth HID Device amp; iOS textFields(蓝牙 HID 设备iOS 文本字段)

本文介绍了蓝牙 HID 设备iOS 文本字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用充当键盘的 BT 设备与 iPad 通话.我们希望这个蓝牙设备与我们应用程序中的 1 个字段对话.(这是自己的看法)我们要显示虚拟键盘的所有其他 textFields/areaFields.

We are using a BT device, which acts as a keyboard, to talk to the iPad. We want this bluetooth device to talk to 1 field in our app. (Which is on it's own view) All other textFields/areaFields we want to display the virtual keyboard.

这可能吗?每当配对 BT 设备时,它都会禁用屏幕键盘.

Is this possible? Whenever the BT device is paired it disabled the on screen keyboard.

我们曾考虑在显示需要从设备输入的 1 字段的视图之前关闭蓝牙,然后在移除视图时将其重新打开,但这有两个问题.iPad 不会自动连接到设备,如果不使用私有 API,就无法关闭蓝牙.

We thought of turning bluetooth off before the view with the 1 field that needs its input from the device is displayed and then turning it back on when the view is removed, but this has 2 problems. The iPad will not automatically connect to the device and there is no way to turn bluetooth off without using private API's.

这是一个相关的问题:强制屏幕键盘在蓝牙键盘连接时显示还没有得到满意的答复.

This is a related question: Force on screen keyboard to show when bluetooth keyboard connected that has not yet got a satisfactory answer.

任何帮助将不胜感激

干杯菲尔

推荐答案

Erica Sadun 找到了一种通过发送 GraphicsServices 事件来恢复键盘的方法.帖子:http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/ 查看源代码链接.发送 GSEvents 可能尚未在 AppStore 中准备好,但可能值得一试.

Erica Sadun found a way of bringing back the keyboard by sending a GraphicsServices event. Post: http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/ see link to source code. Sending GSEvents might not be AppStore ready, but maybe worth a try.

这篇关于蓝牙 HID 设备iOS 文本字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:蓝牙 HID 设备iOS 文本字段

基础教程推荐