←back to thread

20 points WorldDev | 1 comments | | HN request time: 0.2s | source

I want to build a little device that connects two computers together via usb, and send keystrokes from one to the other.

(I would use it to use a laptop keyboard on a headless computers).

I am looking for an easy solution, it does not have to be the cheapest.

ChatGPT points me to Arduino, but as far as I can see, there's no arduino with 2 usb ports. It also points me to Raspery pi zero, but that's a computer, not a microcontroller, so not sure if it's suitable.

If anyone with experience can give me some pointers, it would be greatly appreciated!

Show context
simondanerd ◴[] No.45706288[source]
Sounds like a cool project, but you may find that using SSH or RealVNC to be a bit easier and cheaper.

ChatGPT isn't wrong - this sounds like what you need: https://pypi.org/project/zero-hid/.

replies(1): >>45706500 #
WorldDev ◴[] No.45706500[source]
Thanks for your thoughts. I agree that using software would be easier, but I wanted to do it in hardware in this specific case.

I am unfamiliar with Raspberry pi, but if my understanding is correct, it's running a real os. So I would need to send it a command to actually shut down every time I want to remove the usb device. More generally, having a general purpose OS on the little device seems overkill for that use case, no?

replies(2): >>45706564 #>>45706573 #
throwaway81523 ◴[] No.45706573[source]
I'm confused, why do you want hardware and what do you want the hardware to do? And, why not use a USB keyboard?

You could use an rpi pico. It has a usb port and there is a software hack to bit bang a second usb port, iirc.

replies(1): >>45706592 #
brudgers ◴[] No.45706592[source]
I am wondering if connecting over USB is an XY problem.
replies(1): >>45706928 #
WorldDev ◴[] No.45706928[source]
To try and clarify a bit: I am essentially trying to have a KM (KVM without the V) over USB.

To go one step higher, I am trying to control a mac mini from the keyboard of a macBook.

replies(1): >>45707235 #
1. brudgers ◴[] No.45707235[source]
Why not use the macs’ built in “sharing” functionality?