hi guys, curious if anyone's done this before and need some help pointing in the right direction. i have an AS3 that send keystroke commands to my arduino. how can i make the arduino send the same keystroke command thru ps2 or usb to another machine?

Working on a ps2 library. Maybe some day...

Regards, thenoble66

Sorry, look at this:

Regards, thenoble66

If you're sending the arduino keyboard strokes to a pc/mac you can use java robot to emulate keystrokes with processing. Here's a code snippet for you:

//Processing code
Robot VKey;

void setup()
    VKey = new Robot();
  catch(AWTException a){}

void draw()

This code will spam a continuous stream of a's, even if you minimize the program!

how can i make the arduino send the same keystroke command thru ps2 or usb to another machine?

Just set up the arduino to output serial commands of each key and then you can use serialkeys or similar on the other computer to receive the serial commands and turn them into keypresses.


i want to steer away from serial keys or aac keys as on the other machine i don't have the ability to install anything..... >:( it's all proprietary

so if i could have an AS3 send keystroke commands to the duino and then the duino send them to the new machine is the ideal scenario

ahh ok I thought that might be the case.

Do you have access to accessibility tools? If so then you can use the windows built in serialkeys program, no need to install anything...


i have access to settings. the machine is linux though...never dealt with that before. the script i had before in AS3 doesn't send keystrokes, now that i went thru it again. it interprets and sends commands to pins. so back to sq1. i need to get an AS3 that sends all keyevents to the duino... THEN the duino can send them further down the line..... sometimes i wonder.... ::)

the machine is linux though…

Ahh ok :smiley:


If you're interested in pursuing the USB angle then you might want to take a look at this:


I don’t think anyone has written it up for the Playground yet, but I know I’ve seen a forum posting or two (possibly here, possibly in “Exhibition”) about people using Arduinos to emulate a PS/2 keyboard.

If it’s not going to be the only keyboard on your PC, I suggest adapting the PS/2 emulator code to your application, and buying one of those cheap USB-to-PS/2 adapters: it’s easier than adding a USB HID interface to the Arduino. I know that Xfree will accept having multiple keyboards attached, and I’m pretty sure the console interface will, too. You can confirm that simply by booting the PC with a PS/2 keyboard, and plugging in a real USB keyboard after it’s up and running. That will give you the same conditions you’d see with your device.