STRUCT KEYBOARD_PROTOCOL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct keyboard_protocol(9) πŸ’–

hiii bestie!! welcome to the Kernel API Manual β€” today’s main character is struct keyboard_protocol, and honestly it’s giving keyboard-message excellence πŸ’…βœ¨

🌸 NAME 🌸

struct keyboard_protocol β€” the keyboard message, periodt. This message has message.type = 0x0110 and message.length = 0x000a πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here’s the exact struct, bestie β€” no edits, no vibes-based changes, literally character for character:

struct keyboard_protocol {
    u8 unknown1;
    u8 modifiers;
    u8 unknown2;
    u8 keys_pressed[MAX_ROLLOVER];
    u8 fn_pressed;
    __le16 crc16;
 };

🧚 Members 🧚

okay let’s do the member-by-member vibe check πŸ‘‘

  • unknown1 β€” unknown. The mystery is literally part of the lore πŸ™ˆ
  • modifiers β€” bit-set of modifier/control keys pressed πŸŽ›οΈ
  • unknown2 β€” unknown. Another mystery box, bestie 🎁
  • keys_pressed β€” the (non-modifier) keys currently pressed ⌨️
  • fn_pressed β€” whether the fn key is currently pressed ✨
  • crc16 β€” the crc over the whole message struct (message header + this struct) minus this crc16 field 🫢

πŸ”— SEE ALSO πŸ”—

go be nosy in these, bestie πŸ”πŸ’–

  • Kernel file ./drivers/input/keyboard/applespi.c
  • struct tp_finger(9)
  • struct touchpad_protocol(9)
  • struct command_protocol_tp_info(9)
  • struct touchpad_info_protocol(9)
  • struct command_protocol_mt_init(9)
  • struct command_protocol_capsl(9)
  • struct command_protocol_bl(9)
  • struct message(9)
  • struct spi_packet(9)

that’s the whole page, bestie πŸ’…βœ¨ β€” with love from ./drivers/input/keyboard, October 2026 🫢

πŸ“¦ where this page comes from