vivaldi-fmap.h 906 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _VIVALDI_FMAP_H
  3. #define _VIVALDI_FMAP_H
  4. #include <linux/types.h>
  5. #define VIVALDI_MAX_FUNCTION_ROW_KEYS 24
  6. /**
  7. * struct vivaldi_data - Function row map data for ChromeOS Vivaldi keyboards
  8. * @function_row_physmap: An array of scancodes or their equivalent (HID usage
  9. * codes, encoded rows/columns, etc) for the top
  10. * row function keys, in an order from left to right
  11. * @num_function_row_keys: The number of top row keys in a custom keyboard
  12. *
  13. * This structure is supposed to be used by ChromeOS keyboards using
  14. * the Vivaldi keyboard function row design.
  15. */
  16. struct vivaldi_data {
  17. u32 function_row_physmap[VIVALDI_MAX_FUNCTION_ROW_KEYS];
  18. unsigned int num_function_row_keys;
  19. };
  20. ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data,
  21. char *buf);
  22. #endif /* _VIVALDI_FMAP_H */