Keyboard Serial

In this example the Arduino sends serial data as keystrokes to a connected USB host. http://arduino.cc/en/Tutorial/KeyboardSerial

I would like to reproduce this using the Serial1 library. So I just substituted Serial with Serial1, but although my Serial connection is stable and tested I don't get any keystrokes.

void setup() { Serial1.begin(9600); Keyboard.begin(); }

void loop() { if (Serial1.available() > 0) { char inChar = Serial1.read(); Keyboard.write(inChar); } }

Why is this happening? I would be really pleased if anyone could help me...

would like to reproduce this using the Serial1 library.

Why? You can't anyway because this is not connected to the USB.

Sorry, I've forgot to mention that the Arduino is still connected over USB to the PC and that the Serial data comes in from hardware UART.

What have you physically connected to Serial1?

A serial ttl cable, connected to TX/RX pins

As a debug step, have you echoed what you receive on Serial1 out to Serial?

Grounds are connected?

@James Echo is fine.. and grounds are connected, i will retry now.

now it works, thank you for your time and effort.