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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. extern report_keyboard_t *keyboard_report;
  18. void send_keyboard_report(void);
  19. /* key */
  20. void add_key(uint8_t key);
  21. void del_key(uint8_t key);
  22. void clear_keys(void);
  23. /* modifier */
  24. uint8_t get_mods(void);
  25. void add_mods(uint8_t mods);
  26. void del_mods(uint8_t mods);
  27. void set_mods(uint8_t mods);
  28. void clear_mods(void);
  29. /* weak modifier */
  30. uint8_t get_weak_mods(void);
  31. void add_weak_mods(uint8_t mods);
  32. void del_weak_mods(uint8_t mods);
  33. void set_weak_mods(uint8_t mods);
  34. void clear_weak_mods(void);
  35. /* oneshot modifier */
  36. void set_oneshot_mods(uint8_t mods);
  37. void clear_oneshot_mods(void);
  38. void oneshot_toggle(void);
  39. void oneshot_enable(void);
  40. void oneshot_disable(void);
  41. /* inspect */
  42. uint8_t has_anykey(void);
  43. uint8_t has_anymod(void);
  44. uint8_t get_first_key(void);
  45. #endif