Xbee remote control

I have been using Arduino Duemilanove's at school and have been told to add the softwareserial. Is it not needed for the Leonardos? Using Xbee series 2 on shields and my tutor has configured them, i did a hello world sketch test on the Duemilanove's and communication works between them both, tried doing the same on the Leonardos and not working. The code is pressing keys so is acting like a keyboard, they are hotkeys to carry out functions. This is the only code i got and i guess will be the same for the sender and receiver? Please can you provide information on this as i am new to the Arduino.

Thanks