问题是我想在我的手机和电脑之间使用一个键盘来连接我的电脑。接口应该在Python环境中完成,因为这将有助于我进一步的工作。我需要的东西是
- 使用 python 将我的计算机与键盘连接
- 与手机连接同一个键盘
这样我就可以使用 python 代码通过该键盘控制手机的一般功能。
问题是我想在我的手机和电脑之间使用一个键盘来连接我的电脑。接口应该在Python环境中完成,因为这将有助于我进一步的工作。我需要的东西是
这样我就可以使用 python 代码通过该键盘控制手机的一般功能。
The most general way to connect your computer to a phone would be over TCP/IP, likely delivered via WiFi to your phone. If using an Android, BlueTooth would be another option, but iOS will not connect to unapproved BT devices.
Programming on the handset will likely have to be done in the native language. It's an absolute requirement of iOS, and I'm not sure if you can use Python/Jython to build a full app on Android yet.
On the PC side, you could easily use Python, perhaps its socket
module to talk with the handset over TCP/IP or pySerial's serial
if you use BlueTooth RFCOMM/SPP; though managing the actual BT connection is very complex and very sensitive to drivers.