Have you tried selecting the board type in the menus?
Tools -> Board -> Arduino Leonardo
The Uno ( the default selection ) doesn't have the keyboard libraries.
Sorry that you're pushing the boundaries of our documentation, I'll make sure to get this written up for future tinkerers!