On 12/7/19 14:42, Samuel Sieb wrote:
On 12/7/19 6:22 AM, pmkellly@xxxxxxxxxxxx wrote:
My idea is to connect 2 PCs together via USB. One PC would be running
Python pretending to be the keyboard on the test machine. So of course
I need a Python library that provides for keyboard emulation. I would
You can't connect computers directly with USB like that. However,
depending on your python skills, you could use a network connection and
the python3-evdev and/or python3-uinput libraries to fake a keyboard or
any other device.
My original thought was to write code that would present itself as a
known HID class keyboard. Then I would just sent and receive through
that pretend HID. Now that I think of it though the catch is getting the
PC's USB port to present itself as an HID. The PC's USB port is already
hard programmed to present itself as a controller or hub. Okay I guess
I've talked myself out of USB. To make this work I'd need a cable with a
little box of hardware in the middle that would present itself as a
known client class to both PCs then do message forwarding to both sides.
That's beyond the scope of my "little project".
As for my python skills, Most of what I've done with Python has been
using PCs to control custom hardware over USB. I've never done anything
over a network with python. Depending on other factors regarding this
project. I might start learning the Python libraries you've suggested.
I'm guessing though that using a network interface gets me a step closer
to just duplicating Coconut which is not my intention.
As always, Thanks for your help.
Have a Great Day!
Pat (tablepc)
_______________________________________________
test mailing list -- test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to test-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/test@xxxxxxxxxxxxxxxxxxxxxxx