STRUCT COMMAND_PROTOCOL_CAPSL(9)
π 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's0x01and the docs are like "length?" with a whole question mark, so we're all just guessing together fr fr. It has a value of0x01and honestly it's giving mystery main character energy. πledβ the actual star of the show β¨0= off,2= on. (Yes, not1. 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 herecrc16field 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms