【问题标题】:Escape sequence for Keyboard Down Arrow键盘向下箭头的转义序列
【发布时间】:2020-04-16 19:42:21
【问题描述】:

我有一个 Android JAVA 应用程序连接到我从这里购买的 USB 蓝牙键盘模拟器 http://intelletto.com/products

到目前为止,我可以发送 转义序列,例如 \t、\n,但我不确定如何发送 Key Down 事件的命令。以下是我的做法:

char str = '\t';
byte[] command = String.valueOf(str).getBytes();
mBTService.write(command);

另外,我从 USB 提供商那里得到了这个 HID ASCII 映射表,我不知道如何使用它。

https://drive.google.com/file/d/1hZV5mdaPCN93BK6bYZeX2h9y5lx3R2hS/view?usp=sharing

【问题讨论】:

标签: java android bluetooth hid


【解决方案1】:

根据你贴的地图,肯定是这样的:

byte[] command = new byte[]{(byte)201};
mBTService.write(command);

...201 是“DownArr”的代码(在此特定映射中,尽管这不是标准编码)。

【讨论】:

    猜你喜欢
    • 2010-09-21
    • 1970-01-01
    • 2018-09-16
    • 1970-01-01
    • 1970-01-01
    • 2012-10-06
    • 1970-01-01
    • 1970-01-01
    • 2012-01-16
    相关资源
    最近更新 更多