STRUCT ALPS_FIELDS(9)
π struct alps_fields(9) β the kernel API manual, but make it cute π
okay so bestie, welcome to the struct alps_fields(9) page β this is from the Kernel API Manual, and honestly? it's giving decoded packet realness. no cap. β¨
πΈ NAME πΈ
struct alps_fields β literally the decoded version of the report packet. that's it. that's the whole vibe. the raw packet comes in, and this struct is what it looks like after it got decoded and understood, like when your group chat finally explains the drama. π
β¨ SYNOPSIS β¨
here's the whole shape of her, exactly as she is β do NOT touch the fields, they are iconic and load-bearing:
struct alps_fields {
unsigned int x_map;
unsigned int y_map;
unsigned int fingers;
int pressure;
struct input_mt_pos st;
struct input_mt_pos mt[MAX_TOUCHES];
unsigned int first_mp:1;
unsigned int is_mp:1;
unsigned int left:1;
unsigned int right:1;
unsigned int middle:1;
unsigned int ts_left:1;
unsigned int ts_right:1;
unsigned int ts_middle:1;
};
and yes MAX_TOUCHES is a thing, don't come for me, it's in the original π«Ά
π¦ Members π¦
a field-by-field vibe check, let's go:
x_mapβ bitmap of active X positions for MT. like a little attendance sheet for which X spots are showing up. πy_mapβ bitmap of active Y positions for MT. same energy, but the Y axis this time. πfingersβ number of fingers for MT. yes bestie, we're counting. count them. ποΈpressureβ pressure. that's the whole description. it's pressure. respect the brevity πstβ position for ST. π―mtβ position for MT. π―first_mpβ packet is the first of a multi-packet report. main character of the packet sequence, lowkey. πis_mpβ packet is part of a multi-packet report. it's in the ensemble cast, still slaying. βleftβ left touchpad button is active. πrightβ right touchpad button is active. πmiddleβ middle touchpad button is active. πts_leftβ left trackstick button is active. πΉοΈts_rightβ right trackstick button is active. πΉοΈts_middleβ middle trackstick button is active. πΉοΈ
and yeah, all those :1 ones are single-bit bitfields β tiny little on/off queens. one bit each. efficient. we love her for it. π§
π SEE ALSO π
go read these next, iykyk β they're all in the kernel file ./drivers/input/mouse/alps.h:
struct alps_protocol_info(9)struct alps_model_info(9)struct alps_nibble_commands(9)struct alps_data(9)
all of them live under ./drivers/input/mouse β that's the neighborhood, fr fr. π‘
π real talk though: this page is about a kernel-internal struct, so nothing here is a promise to userspace. it's just the layout, exactly as written. don't go inventing fields, bestie, the compiler will not be nice about it. π
and that's the whole page!! πΈ sign-off time: this cutie comes from ./drivers/input/mouse, dated October 2026, and the footer repped struct alps_fields(9) one more time for the people in the back. periodt. ππ«Άπ
π¦ 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