minor fixes on keyboard protocol