Makey Makey on Leonardo - Rapid fire keystrokes

I also don't understand what the two if statements are for.

There are 8 if statements in the code. Which 2 don't you understand?

We have no idea what you have connected to the analog pins.