aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum_keycodes.h
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-11-04 22:59:13 -0800
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2019-11-04 22:59:13 -0800
commit542cb0a8ce3f324c6bd46751d733daf86384a8f6 (patch)
tree08128a4e00a42fa0e78199d86f757a8d562952a9 /quantum/quantum_keycodes.h
parent0e664f92c4d61d685259607d7257c53f60da5fc0 (diff)
downloadqmk_firmware-542cb0a8ce3f324c6bd46751d733daf86384a8f6.tar.gz
qmk_firmware-542cb0a8ce3f324c6bd46751d733daf86384a8f6.zip
[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/quantum_keycodes.h')
-rw-r--r--quantum/quantum_keycodes.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 5fac6a5ca..51a7e290f 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -505,6 +505,13 @@ enum quantum_keycodes {
505 MAGIC_EE_HANDS_LEFT, 505 MAGIC_EE_HANDS_LEFT,
506 MAGIC_EE_HANDS_RIGHT, 506 MAGIC_EE_HANDS_RIGHT,
507 507
508 // Dynamic Macros
509 DYN_REC_START1,
510 DYN_REC_START2,
511 DYN_REC_STOP,
512 DYN_MACRO_PLAY1,
513 DYN_MACRO_PLAY2,
514
508 // always leave at the end 515 // always leave at the end
509 SAFE_RANGE 516 SAFE_RANGE
510}; 517};
@@ -757,4 +764,11 @@ enum quantum_keycodes {
757# define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF) 764# define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF)
758#endif 765#endif
759 766
760#endif // QUANTUM_KEYCODES_H 767// Dynamic Macros aliases
768#define DM_REC1 DYN_REC_START1
769#define DM_REC2 DYN_REC_START2
770#define DM_RSTP DYN_REC_STOP
771#define DM_PLY1 DYN_MACRO_PLAY1
772#define DM_PLY2 DYN_MACRO_PLAY2
773
774#endif // QUANTUM_KEYCODES_H