casemodes.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright 2021 Andrew Rae ajrae.nv@gmail.com @andrewjrae
  2. *
  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. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include QMK_KEYBOARD_H
  18. // Check whether caps word is on
  19. bool caps_word_enabled(void);
  20. // Enable caps word
  21. void enable_caps_word(void);
  22. // Disable caps word
  23. void disable_caps_word(void);
  24. // Toggle caps word
  25. void toggle_caps_word(void);
  26. // enum for the xcase states
  27. enum xcase_state {
  28. XCASE_OFF = 0, // xcase is off
  29. XCASE_ON, // xcase is actively on
  30. XCASE_WAIT, // xcase is waiting for the delimiter input
  31. };
  32. // Get xcase state
  33. enum xcase_state get_xcase_state(void);
  34. // Enable xcase and pickup the next keystroke as the delimiter
  35. void enable_xcase(void);
  36. // Enable xcase with the specified delimiter
  37. void enable_xcase_with(uint16_t delimiter);
  38. // Disable xcase
  39. void disable_xcase(void);
  40. // Function to be put in process user
  41. bool process_case_modes(uint16_t keycode, const keyrecord_t *record);