我真正想知道的是这是硬件问题,还是软件问题.我可以通过 USB 将我的安卓手机插入电脑并让它充当硬件键盘吗?我不想在电脑上安装任何东西,我希望 android 表现得像标准硬件.
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/ADB/其他 USB 功能.
I've modified kernel on Nexus 7 to act like standard HID keyboard and mouse, without losing MTP/ADB/other USB functionality.
您可以使用 usb-gadget-test 命令行实用程序将击键和鼠标移动发送到您的 PC.我想稍后创建一个远程管理应用程序,它将发送关键事件并从相机接收视频.
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
我已经向 Google Play 发布了一个合适的应用,如果您的 Nexus 7 已植根,您可以直接从应用程序中刷新内核,并使用它发送按键.
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.
这篇关于是否可以将 Android 编程为物理 USB 键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
出现键盘时如何在iOS上调整UITextView的大小?How to resize UITextView on iOS when a keyboard appears?(出现键盘时如何在iOS上调整UITextView的大小?)
如何可靠地检测 iOS 9 上是否连接了外部键盘?How to reliably detect if an external keyboard is connected on iOS 9?(如何可靠地检测 iOS 9 上是否连接了外部键盘?)
如何关闭 iOS 键盘?How do I dismiss the iOS keyboard?(如何关闭 iOS 键盘?)
是否可以在 ios 越狱后使用外部键盘模拟触摸事件Is possible to simulate touch event using an external keyboard on ios jailbroken?(是否可以在 ios 越狱后使用外部键盘模拟触摸事件?)
Android 上的数字软键盘Numeric Soft Keyboard on Android(Android 上的数字软键盘)
如何从 iOS 应用程序上的自定义键盘检索击键?How do I retrieve keystrokes from a custom keyboard on an iOS app?(如何从 iOS 应用程序上的自定义键盘检索击键?)