clean up some minor cosmetic mess in keyboard related code

This doesn't actually fix any real problem.  Does add BUILD_ASSERT
macro into the codebase.