keyboard->arduino->keyboard

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?

http://www.computer-engineering.org/ps2protocol/

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

Regards, thenoble66

Sorry, look at this:

http://www.arduino.cc/playground/Main/PS2Keyboard

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()
{
  try
  {
    VKey = new Robot();
  }
  catch(AWTException a){}
}

void draw()
{
VKey.keyPress(KeyEvent.VK_A);
VKey.keyRelease(KeyEvent.VK_A);
}

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.

Mowcius

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...

Mowcius

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:

Mowcius

If you're interested in pursuing the USB angle then you might want to take a look at this: http://code.rancidbacon.com/ProjectLogArduinoUSB

--Philip;

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.

Ran