How can I do this with a Arduino Mega?

I want to make something like this:

except I want the mega to type a sentence...

anyone able to help me?

The Teensy that the project used is able to act as a USB master. The Mega is not.

On the other hand, the Teensy is cheap - $!6 to $19 plus shipping. The Mega is not.

PaulS:
The Teensy that the project used is able to act as a USB master. The Mega is not.

On the other hand, the Teensy is cheap - $!6 to $19 plus shipping. The Mega is not.

You mean as a USB HID, not a USB master.
The Mega 2560 uses a mega8u2. If you have this version, you can flash the firmware on it to act as a HID device. This is also possible with the UNO.

The Mega 2560 uses a mega8u2. If you have this version, you can flash the firmware on it to act as a HID device. This is also possible with the UNO.

It must be somewhat complex to do this as I have not yet seen anyone here post a project that uses the 8u2 on the mega2650 or Uno in that way?

Lefty

While I have not seen a project completely writing it up, it should be completely possible. I dont have an uno but it would just consist of modifying the LUFA example for Keyboard HID to accept input over serial, compiling it, and then follow the instructions for flashing the 8u2 here: http://arduino.cc/en/Hacking/DFUProgramming8U2 .

i have a 1280...
actually i was hoping for a library that would do the typing and maybe include mouse movements...

The 1280 dos not natively support hid. Youcould try. a circuit like this, practicalarduino.com but I've never gotten consistent results out of it. Your best bet is to send commands over serial and then write a processing helper application that runs in the background on the pc, receiving the serial commands and simulating a keyboard and mouse USing the robots class.