Sketch for Arduino Leonardo

I bought Arduino Leonardo to use as a keyboard.

Can I have an easy sketch to test the commands <KEY_RIGHT_ARROW> and << KEY_LEFT_ARROW>

Thanks

What about:

Addit:
Pls don't double post: https://forum.arduino.cc/index.php?topic=419483.0