formatting, use case-insensitive string compare, use defines for keycodes