Replaced magic numbers for string lenghts with sizeof. Corrected sizeof statements for keyboard_*; we shouldn't count the trailing zero.