Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

action_util.h 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. Copyright 2013 Jun Wako <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef ACTION_UTIL_H
  15. #define ACTION_UTIL_H
  16. #include <stdint.h>
  17. #include "report.h"
  18. extern report_keyboard_t *keyboard_report;
  19. void send_keyboard_report(void);
  20. /* key */
  21. void add_key(uint8_t key);
  22. void del_key(uint8_t key);
  23. void clear_keys(void);
  24. /* modifier */
  25. uint8_t get_mods(void);
  26. void add_mods(uint8_t mods);
  27. void del_mods(uint8_t mods);
  28. void set_mods(uint8_t mods);
  29. void clear_mods(void);
  30. /* weak modifier */
  31. uint8_t get_weak_mods(void);
  32. void add_weak_mods(uint8_t mods);
  33. void del_weak_mods(uint8_t mods);
  34. void set_weak_mods(uint8_t mods);
  35. void clear_weak_mods(void);
  36. /* oneshot modifier */
  37. void set_oneshot_mods(uint8_t mods);
  38. void clear_oneshot_mods(void);
  39. void oneshot_toggle(void);
  40. void oneshot_enable(void);
  41. void oneshot_disable(void);
  42. /* inspect */
  43. uint8_t has_anykey(void);
  44. uint8_t has_anymod(void);
  45. uint8_t get_first_key(void);
  46. #endif