Navigate menu: U, J, H, K
Menu select: spacebar
Go back in menu: S
The hats are for just for looks; they don't do anything special. If you're hardcore, you'll find all the hidden hats, and I mean ALL of them. Most hidden hats are obtained by achieving a statistical goal (e.g. destroying a LOT of trees).
The game controls are best explained visually, in the game. To see the keys, you can pause the game with the Return key (aka Enter).