STRUCT CROS_EC_KEYB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” true to 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 (or NULL). β€” non-matrix buttons and switches input device, or NULL.
  • 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 πŸ’–

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