Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: USB keyboard question

  1. #1

    USB keyboard question

    Looking for ideas on how to split keyboard and mouse to switch between two computers, basically, a KVM switch only for inputs no video. I have not worked with USB stuff before but am I correct in thinking that I should be able to wire a USB hub with the keyboard/mouse receivers to a serial input on the Teensy and then wire two outputs with usb male plugs for the two computers I want to control? Would just use a button from there to select what output I am communicating with. I am nearly 100% positive I am oversimplifying this but I didnt find a whole lot of examples on google that werent trying to integrate video or audio in some way.

  2. #2
    I have done some additional research on this and wanted to give a couple more details as I think there is a route I could do to simplify this. The goal is to leave the teensy plugged into my laptop and have a button on my desk wired to it so that when the button is pressed it could tell the computer to stop accepting keyboard commands there and instead send them to a raspberry pi. This is where I am wondering if it is possible to instead trying to send the keyboard commands via USB could I do it via serial from the teensy to Arduino pins?

  3. #3
    I have been playing with something like this. Trying both Teensy 3.6 using its USB Host port with attached USB hub for KB/Mouse input and also some stand alone KB/MOUSE USB Hosts. Then serial out to a number of M0 Trinkets for keyboard/mouse emulation on the target device.

    So you could use the USB host port on a 3.6 to input the KB and Mouse and then send the KB/Mouse to the PC over the USB of the T3.6 (as HID) and then for the PI send from the T3.6 over serial to a T3.2 or M0 Trinket. (cheap).
    Search for USBHost_t36 as a good starting point and look at the mouse example for getting the KB and Mouse input into the T3.6.

    Hope this is of some help.
    ps you need to isolate between the serial lines so that you dont back power one micro-controller from the other.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts