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.

35 lines
1.4 KiB

  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // https://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. //
  15. //
  16. // Caps Word, activated by pressing both shift keys at the same time.
  17. //
  18. // This library implements "Caps Word", which is like conventional Caps Lock,
  19. // but automatically disables itself at the end of the word. This is useful for
  20. // typing all-caps identifiers like `MOD_MASK_ALT`.
  21. //
  22. // Caps Word is activated by pressing the left and right shift keys at the same
  23. // time. This way you don't need a dedicated key for using Caps Word. I've
  24. // tested that this works as expected with one-shot mods and Space Cadet Shift.
  25. // If your shift keys are mod-taps, activate Caps Word by holding both shift
  26. // mod-tap keys until the tapping term, release them, then begin typing.
  27. //
  28. // For full documentation, see
  29. // https://getreuer.info/posts/keyboards/caps-word
  30. #pragma once
  31. #include QMK_KEYBOARD_H
  32. bool process_caps_word(uint16_t keycode, keyrecord_t* record);