One USB keyboard to Two USB Ports


Closed Thread
Results 1 to 2 of 2
  1. #1

    Question One USB keyboard to Two USB Ports

    Hello,

    I have an interesting project and I wonder if anybody would like to provide some input on it.

    First, the problem and what I "think" I need to do to solve it:

    I have a Logitech G15 gaming keyboard and it's amazing! I also have an Aten CS1784 DVI/USB KVM switch, and it's also a pretty great piece of gear.
    There's only one problem: they don’t really “like” each other very much.
    If you connect the keyboard to the 'keyboard' USB port on the KVM, the switching function (i.e. “scroll lock – scroll lock – ENTER” switches to the next PC) will work, but the keyboard response for everything else is really sketchy. Sometime the keystrokes will be received sometimes not. Other times the key will just start repeating for no good reason. So, when connected to the 'keyboard' USB port on the KVM switch my Logitech G15 is just a really expensive KVM controller. Not good. However, if I connect a generic keyboard to the KVM’s 'keyboard' USB port then everything works properly.
    Now, if I plug the G15 into the KVM’s 'hub' USB port, voila! It works perfectly! Good news right? Wrong! Although the keyboard works fine now, because it’s not connected to the 'keyboard' USB port I can’t use it to control the KVM’s switching functions (i.e. “scroll lock – scroll lock – ENTER” does absolutely nothing).

    So, what I want to do it this…

    I want to keep the G15 connected to the KVM’s 'hub' USB port, but I want to somehow intercept or “sniff” the commands being sent from the keyboard through the KVM to the active PC using a PIC, and I want to intercept them at the point between the keyboard and the KVM's 'hub' USB port. Then, I want to detect only the key presses that are related to KVM switching and pass these key press commands along to the KVM switch’s 'keyboard' USB port (if I pass everything along then I will get double-type on the screen). I’m pretty sure that passing the commands along will be easy, but it’s the “sniffing” that I’m not sure about.

    So, has anybody done this before (or something similar) or think they may know how to do this? Even more importantly, if anybody knows of a product that already exists that will basically fit my needs, I’d be very interested, because I’d rather not waste my time with this if I don’t have to.

    Anyway, please let me know.

    Cheers!
    Last edited by picnaut; - 10th June 2009 at 23:37.
    ---> picnaut

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I've learned to Never say Never, because someone will invariably show you how to do it.

    But, I'm pretty sure you can't "sniff" the keystrokes.
    A 12megabit/sec half-duplex data stream is beyond the capabilities of a PIC.

    Even using a USB "host" like the Vinculum or USBwiz will only work with standard keyboards. The gaming keyboard needs special drivers on the PC that the "host" controller doesn't know about. Which is also why it doesn't work with the KVM's "host controller".

    What if you made a separate device with a few push buttons that only sends the KVM commands?
    A Little box sitting next to your keyboard.

    This should be easy(er) with an 18F2550 or similar.
    <br>
    DT

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  3. AT/PS2 Keybord - PIC Interface?
    By Kamikaze47 in forum Code Examples
    Replies: 73
    Last Post: - 9th August 2009, 16:10
  4. Replies: 3
    Last Post: - 10th April 2008, 10:02
  5. Replies: 6
    Last Post: - 10th January 2008, 10:38

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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