new to this, using copied code, getting errors

Delta_G:
The code is sometimes very specific to features on a specific microcontroller. In the case of the Keyboard library is only works on 32u4 based boards. If you'd read the documentation for the library it says so in the first few sentences.

I don't even have a clue what this library you're talking about is. I will do some research on it. I also have a book on writing code for these. I have not really looked at it due to be tied up with other things. I guess I know what I'm doing tomorrow.