Mouse passthru

Status
Not open for further replies.

demonjosh

New member
Hey, I just ordered my teensy 4.1 and I am now wondering how I can setup my mouse passthru.

My goal is to have a setup like this:
Mouse -> teensy -> PC​
Where the teensy can passthru the mouse to the PC as normal.

However I also want to be able to send instructions to the teensy from my PC to tell it to modify the mouse inputs when I need.
Therefore I would also need a way for the PC to communicate back to the teensy as well as outputting as a mouse.

I am wondering how I would be able to achieve this? Is it enough to just use two cables (one for connect mouse to teensy and then one for connecting teensy to PC)?
Or will I need a third connection, any advice would be appreciated.
 
Hello, have you thought about how your going to connect them? The mouse can connect to the T4.1 USB host port and the T4.1 to the pc via its normal USB client port. There is an example program for a USB host mouse in the USBHost_t36 folder. The Teensy code can be compiled with USB Type -> Serial + Keyboard + Mouse + Joystick. You would need to write code to pass from host to client on the T4.1 and a pc program to communicate via the serial interface back through the T4.1 USB client port. That's how I would try to do it anyway.

Mouse activity
Mouse -> USB Host (Mouse) -> T4.1 -> USB Client (Serial + KB +Mouse + Joy) -> PC

PC commands to Teensy
PC (Serial) -> USB Client (Serial + KB +Mouse + Joy)-> T4.1
 
Just to check, would this appear as only one mouse to the PC?
Then, will I only need the two cables (female USB to connect to the board and micro-usb to connect to the PC to act as mouse outputs and take in data from the program for the teensy)?

In addition,
I was wondering if I should maybe try a Arduino + Host Shield instead of going straight with a teensy. I haven't done any soldering or electric work before so idk where to even start :confused:
 
Just to check, would this appear as only one mouse to the PC?
It's possible to make the teensy appear as only one device. But, I'm pretty sure you won't be able to send data back to the teensy via the USB that is plugged into the PC.
What you could do if your PC has Bluetooth build in is attaching a hc-05 to your teensy and communicate via that (this is what I am using for the same kind of project)

I would recommend using a teensy for the libraries that are very well documented, making it easier to learn from the code and modify it as you need!

Here is a link to a gamehacking forum where someone has built a very similair project: https://www.unknowncheats.me/forum/anti-cheat-bypass/439183-mouse-proxy-teensy-4-1-a.html
 
But, I'm pretty sure you won't be able to send data back to the teensy via the USB that is plugged into the PC.

It should appear on the pc as Serial + Keyboard + Mouse + Joystick, and you can connect via serial while simultaneously using it as a USB mouse. I've not tried it, but I use Serial + MIDI + Digital Audio and that works fine together.
 
But demonjosh wants it to appear as only one device, so there wouldn't be any other device besides a mouse being exposed to the OS.
 
Status
Not open for further replies.
Back
Top