是否有可能进行编程的Andr​​oid充当物理USB键盘?有可能、键盘、物理、oid

2023-09-12 08:29:29 作者:风软一江水

我真正想知道的是,它是否是硬件问题,还是软件问题。我可以插入我的Andr​​oid手机变成通过USB的计算机,并把它作为一个硬件键盘。我不想在计算机上安装任何东西,我想机器人表现得像个标准的硬件。

What I really want to know is whether it is a hardware problem, or a software problem. Could I plug my android phone into a computer via USB and have it act as a hardware keyboard. I do not want to install anything on the computer, I want android to behave like the standard hardware.

编辑:澄清 我想编写一个程序/库的android,使该设备完全模拟一个普通的键盘,让操作系统报告为标准键盘的设备,它会工作在BIOS中或其他地方,一个键盘的工作原理。

Clarification I want to write a program/library for android that enables the device to fully emulate an ordinary keyboard, so that the operating system reports it as a standard keyboard device, and it would work in the BIOS or anywhere else that a keyboard works.

推荐答案

我已经修改过的内核上的Nexus 7要像标准的HID键盘和鼠标,而不会失去MTP /亚洲开发银行/其他USB功能。

I've modified kernel on Nexus 7 to act like standard HID keyboard and mouse, without losing MTP/ADB/other USB functionality.

您可以使用USB-小工具测试命令行工具来发送击键和鼠标移动到你的电脑。我想以后创建一个远程管理应用程序,它会发送关键事件,并从摄像头接收视频。

You can use usb-gadget-test commandline utility to send keystrokes and mouse movements to your PC. I want to create a remote admin app later, which will send key events and receive video from camera.

内核补丁,二进制文件和说明: https://github.com/pelya/android-keyboard-gadget

Kernel patch, binaries and instructions: https://github.com/pelya/android-keyboard-gadget

编辑:我已经出版了一本合适的应用程序,以谷歌播放如果您的Nexus 7是植根你可以刷内核直接从应用程序,并发送键presses吧。

I've published a proper app to Google Play, if your Nexus 7 is rooted you can flash kernel right from the app, and send keypresses with it.

 
精彩推荐
图片推荐