Close
0%
0%

Keyboard Mouse

Use an old PS/2 Keyboard as a USB mouse

Similar projects worth following
This project uses an old PS/2 Keyboard as a USB mouse. It utilizes a Adafruit Trinket to translate the PS/2 keycodes to USB and implements a few features.

You might ask why I would do this, and that's a good question. I got tired of clicking. I like playing clicking games, ones where clicking repeatedly get's you resources that you can then use to buy things that click for you. The part of the games that I like are the resource and component management. I don't care about clicking a lot. So, I made this hack that allows me to position the mouse cursor where I want and click like mad on demand.

It can be used any way you want, but for now I'm leaving it like this. I plan to make a mouse input version of this as soon as I find one of my old PS/2 mice somewhere.

  • Where is my mouse?

    Jared Young01/09/2016 at 18:30 0 comments

    I cannot find a PS/2 mouse in any of my boxes of junk. I don't know why, but I suspect my wife got to me one day and I threw it out thinking I could never come up with a need for it. I was wrong.

    Because I cannot find a PS/2 mouse, I guess I'll just have to use a keyboard.

    And that is how I ended up with a device that converts a PS/2 keyboard into a USB mouse.

    I wanted the mouse to allow me to create a device that I could click really fast on games that need fast clicking to get ahead, so this is for cheating on simple web games too.

    Finally, this goes to show that a lot of good libraries are out there already, and good hardware too. The PS/2 connector is just jumpered directly to power, ground, and two IO lines on a Trinket. No extra hardware there, just an existing library that lets us read keycodes. And to emulate the mouse, there is code for the trinket that uses VUSB to show up as a mouse, we can send any mouse movements or clicks that we want. It takes very little logic to glue the two together.

    Arrow keys move the mouse, number keys set the number of pixels per button press to move it. A, S, and D are the mouse buttons, and I have not put in anything for the scroll wheel yet. Pressing Enter toggles rapidly clicking the left mouse button, basically as fast as the hardware can send it.

    That's it.

    I'm sure this could be usefull, I suspect some accessibility devices could be built on this setup, and other cheates too. You can emulate a keyboard about as easily as a mouse, and most systems allow you to have multiple of either connected.

    Finally, this works on Andriod as well, I just connected using a USB OTG adapter to my config and was able to do clicking games on my phone as well.

View project log

  • 1
    Step 1

    Build instructions are in the Git repo readme file. It mostly consists of connect the PS/2 connector to the trinket and load the code.

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates