Resetting Leonardo

Hi, I made a huge mistake. Made a program which types a letter on the computer as I press a button. But messed up something and now as soon as I connect it to my computer it starts to type endless lines of letters and can't do anything on the computer.
Any ideas how to fix this? Maybe resetting the Leonardo (but how)?

Thank you,

With 328P boards, you can press & hold Reset, release it when the IDE shows "Compiled xxx or 32xxx bytes". Can take a couple of tries to get the release timing correct. Easier to do if you select File:Preference and turn on verbose outputs. Just download simple Blink program.

Perhaps the same procedure works with 32U4 boards.