Go Down

Topic: Arduino as PS/2 Keyboard (Read 1 time) previous topic - next topic


Hello! I'm quite excited about developing for arduino.
I need to do something that I "think" it's possible using the ps/2 communication library but I would like to hear if someone has attempted this and the results of it.

I need to make a sort of reduced PS/2 keyboard using arduino, the input will be a few switches connected to arduino and once a button is pressed arduino would send the keypress to a computer via its ps/2 port as it were a REAL keyboard (but with less buttons).

Any advice, comment, report or whatever will be highly appreciated, thanks! :)


  I don't see any reason why an arduino couldn't be a keyboard.  It's only a little more complicated than
reading a keyboard.  You can probably ignore most of the messages that the computer sends to the keyboard.

I have found the following site to be invaluable when working with PS2 protocol.

Good luck. If you get it working, please put the code in the Playground.


Thanks, I'll give it a try! :)


You might also want to check out if you're on windows (or maybe possibly with other OS), accessibility options.

In windows XP there is an accessibility option to use an external input device. This interfaces to a COM port so if you turn this option on and select the COM port of your arduino, any letters sent from the arduino to the PC will be treated as keyboard input.

Keep in mind this is only for text entry, ie when an "a" is sent, the window in focus receives "a" as a keystroke. Normally on a keyboard there is a window message and keycodes to indicate when a key is pressed, and also when it is released. So, if you need to be able to sense key press/release, the windows feature would not suffice.


mm, may be an option but I was looking for a more complete solution, thanks anyway I think I may work out on something...


Hello friend,

How far did you go with that?
I have a very simple app on my desktop that I would like to trigger off 4 buttons on my Arduino... Actions are already mapped to keys like 1,2,3 and 4...

Still I have not idea not even on how to build the circuit! Any hint?

Go Up