pub fn write_keyboard( keyboard_state: &KeyboardState, gadget_writer: &mut BufWriter<&mut File>, ) -> Result<(), Error>