keycombo.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * include/linux/keycombo.h - platform data structure for keycombo driver
  3. *
  4. * Copyright (C) 2014 Google, Inc.
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16. #ifndef _LINUX_KEYCOMBO_H
  17. #define _LINUX_KEYCOMBO_H
  18. #define KEYCOMBO_NAME "keycombo"
  19. /*
  20. * if key_down_fn and key_up_fn are both present, you are guaranteed that
  21. * key_down_fn will return before key_up_fn is called, and that key_up_fn
  22. * is called iff key_down_fn is called.
  23. */
  24. struct keycombo_platform_data {
  25. void (*key_down_fn)(void *);
  26. void (*key_up_fn)(void *);
  27. void *priv;
  28. int key_down_delay; /* Time in ms */
  29. int *keys_up;
  30. int keys_down[]; /* 0 terminated */
  31. };
  32. #endif /* _LINUX_KEYCOMBO_H */