Leonardo as runaway keyboard

I am newer to Arduino Community. I have an Uno and now a new Leonardo.

I am building a vehicle simulator using the Leonardo to convert buttons/switches to key input.

I used an incorrect script and now the Leonardo wont stop inputting the letter "K" when I plug it in.

The reset button stops it temporarily but then it begins again.

I've also tried combining reset button and then uploading new code to stop it but it doesn't work.

Can someone please help me with a way to stop this or point me in the direction of a thread that can.

Thanks Again!

I have some code. Something is wrong with it. I'm not going to show it to you, but can you help me figure out where the error is.

Not worried about the code. I made a stupid error and understand what I did wrong.

I just want to know how I can upload new code into or shut down a Leonardo (that the computer recognizes as a keyboard) if it wont stop sending a constant key stroke.

There is a note about that in the keyboard/mouse library documentation page. Look there.

Regards,
Ray L.