STRUCT CROS_EC_KEYB(9)
β¨ NAME β¨
okay so bestie, this is the tea on struct cros_ec_keyb(9) from the Kernel API Manual π
itβs literally the structure representing EC keyboard device β the whole EC-keyboard-device vibe in one struct, no cap π
πΈ SYNOPSIS πΈ
hereβs the exact fit, bestie β keep it character for character or the compiler will absolutely side-eye you π
struct cros_ec_keyb {
unsigned int rows;
unsigned int cols;
int row_shift;
bool ghost_filter;
u8 valid_keys[CROS_EC_KEYBOARD_COLS_MAX];
u8 old_kb_state[CROS_EC_KEYBOARD_COLS_MAX];
struct device *dev;
struct cros_ec_device *ec;
struct input_dev *idev;
struct input_dev *bs_idev;
struct notifier_block notifier;
struct vivaldi_data vdata;
bool has_fn_map;
bool fn_active;
bool fn_combo_active;
};
π Members π
okay now the member-by-member gossip β every single one is here, and yes weβre being thorough π
rowsβ Number of rows in the keypad β literally the row count, bestie.colsβ Number of columns in the keypad β the column count, periodt.row_shiftβ log2 or number of rows, rounded up β thatβs the exact description, no cap.ghost_filterβtrueto enable the matrix key-ghosting filter β the ghosting-filter switch, cute.valid_keysβ bitmap of existing keys for each matrix column β the existing-key bitmap for each matrix column π¦old_kb_stateβ bitmap of keys pressed last scan β the keys-pressed-last-scan bitmap.devβ Device pointer β yep, just the device pointer.ecβ Top level ChromeOS device to use to talk to EC β the top-level ChromeOS device you use to talk to the EC.idevβ The input device for the matrix keys. β the matrix-keys input device.bs_idevβ The input device for non-matrix buttons and switches (orNULL). β non-matrix buttons and switches input device, orNULL.notifierβ interrupt event notifier for transport devices β the interrupt event notifier for transport devices.vdataβ vivaldi function row data β the vivaldi function row data.has_fn_mapβ whether the driver uses an fn function-map layer β tells you whether the driver uses an fn function-map layer.fn_activeβ tracks whether the function key is currently pressed β tracks if the function key is pressed right now.fn_combo_activeβ tracks whether another key was pressed while fn is active β tracks if another key got pressed while fn is active.
π SEE ALSO π
- Kernel file
./drivers/input/keyboard/cros_ec_keyb.c struct cros_ec_bs_map(9)cros_ec_keyb_report_bs(9)cros_ec_keyb_info(9)cros_ec_keyb_query_switches(9)cros_ec_keyb_resume(9)cros_ec_keyb_register_bs(9)cros_ec_keyb_register_matrix(9)
xoxo bestie π source/version: ./drivers/input/keyboard, date: October 2026, and the page is struct cros_ec_keyb(9). 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