cros_ec_keyb_query_switches(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 πŸ”₯

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 says cros_ec_keyb_query_switches(9) too, because consistency is also main character energy. mwah! πŸ’…βœ¨πŸŒˆ
πŸ“¦ where this page comes from