Fixed off by one error in pressed array

#defines give meaning to constant values
Keyboard events now make sense

Letter states are unified for capital and lower cases.
Shift and Control now consider both of their keys when determining their state.
Added range checks for array accesses.
Use new #defines for key IDs
Fixed several compiler warnings.
Formatting
Merge pull request #217 from psycocoffey/master

Keyboard Fixes for Issue 215