cros_ec_keyb_query_switches(9)
β¨ cros_ec_keyb_query_switches π
okay so this is a cros_ec_keyb_query_switches(9) moment β it's straight out of the Kernel API Manual, and it's literally the function that goes "hey EC, what's up with the switches bestie" and then tells the kernel. no cap. π
πΈ NAME πΈ
cros_ec_keyb_query_switches β query the state of switches and report π¦
β¨ SYNOPSIS β¨
int cros_ec_keyb_query_switches (struct cros_ec_keyb *ckdev );
π«Ά ARGUMENTS π«Ά
ckdevβ the keyboard device π (yes that's it, that's the whole argument, she's low maintenance)
π« DESCRIPTION π«
so the way this works is: it asks the EC about the current state of the switches, and then reports that back to the kernel. iconic behavior, honestly. π
quick heads up tho β we do not query for buttons, because buttons are more transitory and we'll get an update on the next release / press anyway. so likeβ¦ no need to be extra about it. π
Returns 0 if no error, or -error upon error. periodt. π
π₯ SEE ALSO π₯
- Kernel file
./drivers/input/keyboard/cros_ec_keyb.c struct cros_ec_keyb(9)struct cros_ec_bs_map(9)cros_ec_keyb_report_bs(9)cros_ec_keyb_info(9)cros_ec_keyb_resume(9)cros_ec_keyb_register_bs(9)cros_ec_keyb_register_matrix(9)
all the siblings fr fr, go read them too π§
π that's the whole vibe! this one lives over in./drivers/input/keyboard, dated October 2026, and yeah β the footer sayscros_ec_keyb_query_switches(9)too, because consistency is also main character energy. mwah! π β¨π
π¦ 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