diff options
author | Drashna Jaelre <drashna@live.com> | 2019-11-04 22:59:13 -0800 |
---|---|---|
committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2019-11-04 22:59:13 -0800 |
commit | 542cb0a8ce3f324c6bd46751d733daf86384a8f6 (patch) | |
tree | 08128a4e00a42fa0e78199d86f757a8d562952a9 /quantum/dynamic_macro.h | |
parent | 0e664f92c4d61d685259607d7257c53f60da5fc0 (diff) |
[Core] Convert Dynamic Macro to a Core Feature (#5948)
* Convert Dynamic Macro to a Core Feature
This imports the code from Dynamic Macro into the core code, and handles it, as such.
This deprecates the old method but does not remove it, for legacy support. This way, no existing user files need to be touched.
Additionally, this reorganizes the documentation to better reflect the changes.
Also, it adds user hooks to the feature so users can customize the existing functionality.
Based heavily on and closes #2976
* Apply suggestions from code review
Co-Authored-By: fauxpark <fauxpark@gmail.com>
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Cleanup based on feedback
* Add short-form keycodes and document them
- add short-form keycodes to quantum/quantum_keycodes.h
- document the new aliases in docs/feature_dynamic_macros.md
* Add Dynamic Macros section and keycodes to docs/keycodes.md
* Make anti-nesting optional
* Add documentation for DYNAMIC_MACRO_NO_NESTING option
* Fix Merge artifacts
* Fix formatting typo in docs
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Remove DYNAMIC_MACRO_RANGE as it's not needed
* Fix includes and layer var type
Diffstat (limited to 'quantum/dynamic_macro.h')
-rw-r--r-- | quantum/dynamic_macro.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h index c7632c004b..fe9de6fa65 100644 --- a/quantum/dynamic_macro.h +++ b/quantum/dynamic_macro.h @@ -15,8 +15,10 @@ */ /* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ -#ifndef DYNAMIC_MACROS_H -#define DYNAMIC_MACROS_H +#pragma once + +/* Warn users that this is now deprecated and they should use the core feature instead. */ +#pragma message "Dynamic Macros is now a core feature. See updated documentation to see how to configure it: https://docs.qmk.fm/#/feature_dynamic_macros" #include "action_layer.h" @@ -33,18 +35,6 @@ # define DYNAMIC_MACRO_SIZE 128 #endif -/* DYNAMIC_MACRO_RANGE must be set as the last element of user's - * "planck_keycodes" enum prior to including this header. This allows - * us to 'extend' it. - */ -enum dynamic_macro_keycodes { - DYN_REC_START1 = DYNAMIC_MACRO_RANGE, - DYN_REC_START2, - DYN_REC_STOP, - DYN_MACRO_PLAY1, - DYN_MACRO_PLAY2, -}; - /* Blink the LEDs to notify the user about some event. */ void dynamic_macro_led_blink(void) { #ifdef BACKLIGHT_ENABLE @@ -272,5 +262,3 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record) { #undef DYNAMIC_MACRO_CURRENT_SLOT #undef DYNAMIC_MACRO_CURRENT_LENGTH #undef DYNAMIC_MACRO_CURRENT_CAPACITY - -#endif |