Added JSDoc to the keyboard input handlers