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.

46 lines
1.1 KiB

[Keymap] csc027/macro-sync-keymap (#7873) * Basic functionality to synchronize the strings and enums using C preprocessor macros. * Updated all the custom convenience macros to work. * Removed some duplicate update_tri_layer calls. * Simplified the convenience accelerator macros for synchronizing enums and strings by removing the short enum names. * Updated the CUSTOM_MACROS macro to use SS_LCTL instead of SS_LCTRL. * Fixed a bug where the right side of the convenience layer in the Iris keymap was incorrectly listed twice. * Removed the tenkey from the convenience layer. Added Windows 10 virtual desktop shortcuts to the convenience layer. * Fixed a bug where the macro range was not set correctly. * Added sigil values for the keycode enum so that additions to the sync macros will not require changes to the process_record_user ranges. * Hacked send_string_P to work with ChibiOS boards. * Switched to using I2C for the Iris keyboard. * Finished a comment. * Updated comments to explain that for non-AVR MCUs, the PROGMEM macro doesn't do anything. * Updated the synchronization macros to use the more descriptive "NAME" instead of "CALL". Moved the Control-Alt-Delete chord macro to the synchronization macro. * Simplified the custom macros by consolidating the macros into a context change macro instead of using alt-tab and minimize macros. * Fixed a formatting issue where several tabs were used instead of 4 spaces. * Added more comments to explain the synchronization macros. * Simplified the PARAMS macro, since any parameters could be passed with a space by the declarer instead. * Consolidated the synchronization macros into a single list. Simplified the synchronization mechanism. * Removed the overloading macro, since it is no longer needed. * Updated the convenience layer comments to reflect the changes made. * Renamed the git_macros pointer table to custom_macros, since it no longer solely consists of git macros. * Clarified that the send_string_P function's use of pgm_read_byte is different for AVR and non-AVR compilation targets.
4 years ago
  1. /*
  2. Copyright 2020 Constantine Chen @csc027
  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. #pragma once
  15. #include "quantum.h"
  16. #include "defines.h"
  17. enum custom_keycodes {
  18. // Layer Keycodes
  19. LOWER = SAFE_RANGE,
  20. RAISE,
  21. MC_first,
  22. // Macro Keycodes
  23. CUSTOM_MACROS(CUSTOM_ENUM, DROP, COMMA_DELIM),
  24. MC_last
  25. };
  26. enum custom_layers {
  27. _QW = 0, // Qwerty
  28. _RS, // Raise
  29. _LW, // Lower
  30. _MS, // Mouse
  31. _WT, // Windows Terminal
  32. _CN, // Convenience
  33. _GG, // General Gaming
  34. _CS // Counter-Strike: Global Offensive
  35. };