Electronic – Is it possible to make a USB device that would alter mouse data on the fly

protocolusb device

I have a friend who is struggling to find mouse drivers/manufacturers that support various options for dyslexia. Inverting the X and Y axes are a simple feature that most programs and drivers are ignorant of.

The thought occurred to me that it might be possible to construct a small USB device (similar to a thumb drive or PS/2 adapter) that a user could plug a USB mouse into and, using a couple of DIP switches, invert one or both axes.

I have a basic familiarity with programming (C#/C+) and electronics, but am not sure if there is a standard protocol for USB mice.

I'd prefer to avoid using a serial converter (though I know it has a more or less standard protocol). Has anyone used USB mice with a custom electronics project, or can explain whether constructing a USB-to-USB adapter to invert movement is possible?

Best Answer

While this is probably far from the cheapest or most elegant solution, it is one that will give you great flexibility.

An Arduino single board computer can look to a Windows host computer like a Human Interface Device (HID), in other words a mouse. It is not limited to mice however; keyboards and other devices are HID as well.

You could hook a serial mouse directly to the Arduino's serial port or if you prefer to use a USB mouse you could connect it to the Arduino via a USB host shield.

Since you can program the Arduino in C you can translate any sorts of inputs from the mouse into any commands you like going to the PC. You could for example translate a triple click of the right mouse button into a keyboard input command, the sky is the limit.

Related Topic