STRUCT COMMAND_PROTOCOL_CAPSL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME (aka what is this even)

struct command_protocol_capsl β€” the literal toggle-the-caps-lock-LED message, bestie. Like, the whole struct is just "hey keyboard, light up that little light" and honestly? Iconic. πŸŽ€

Here's the tea: message.type = 0x0151, message.length = 0x0002. That's it. That's the whole vibe.


✨ SYNOPSIS ✨

struct command_protocol_capsl {
    u8 unknown;
    u8 led;
    __le16 crc16;
 };

Look at her. Three fields. No notes. 🫢


🌸 Members (the cast of characters) 🌸

  • unknown β€” this one's 0x01 and the docs are like "length?" with a whole question mark, so we're all just guessing together fr fr. It has a value of 0x01 and honestly it's giving mystery main character energy. πŸ™ˆ
  • led β€” the actual star of the show ✨ 0 = off, 2 = on. (Yes, not 1. Two. That's the vibe check and it passed.) πŸ”₯
  • crc16 β€” the integrity checker πŸ’€ this is the crc over the whole message struct β€” that means the message header plus this struct β€” minus this here crc16 field itself. Lowkey the most important member and it's just doing math in the corner. Not me being obsessed with a checksum. 😭
Don't forget: the crc covers the message header + this struct, but it does not cover the crc16 field. That's the rule. Periodt. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Ok so there's a whole friend group here and you should meet all of them 🫢:

  • Kernel file ./drivers/input/keyboard/applespi.c
  • struct keyboard_protocol(9)
  • 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_bl(9)
  • struct message(9)
  • struct spi_packet(9)

Ok that's the whole page, bestie! Go forth and toggle that caps-lock LED responsibly πŸ’–

Signed, sealed, delivered from ./drivers/input/keyboard in the October 2026 era of the Kernel API Manual β€” stan the kernel, drink water, and don't forget to check your crc16. πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from