The last time I played with the Leonardo board was perhaps last summer, so I need to download the latest Arduino integrated development environment (IDE) software, ARDUINO 1.5.6-r2 BETA 2014.02.21, from: http://arduino.cc/en/Main/Software#.UxiCvT9_vee
http://blog.radioartisan.com/arduino-cw-keyer/
A CW keyer software by K3NG is available at the above link. The highlighted area (in yellow) shows just a small part of the source code.