Normalise Dynamic Macro keycodes (#18939)

* `DYN_REC_START1` -> `QK_DYNAMIC_MACRO_RECORD_START_1`

* `DYN_REC_START2` -> `QK_DYNAMIC_MACRO_RECORD_START_2`

* `DYN_MACRO_PLAY1` -> `QK_DYNAMIC_MACRO_PLAY_1`

* `DYN_MACRO_PLAY2` -> `QK_DYNAMIC_MACRO_PLAY_2`

* `DYN_REC_STOP` -> `QK_DYNAMIC_MACRO_RECORD_STOP`

* Update docs
This commit is contained in:
Ryan 2022-11-04 10:01:06 +11:00 committed by GitHub
parent 3de296f420
commit fe18df9d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 216 additions and 210 deletions

View File

@ -6,21 +6,21 @@ You can store one or two macros and they may have a combined total of 128 keypre
To enable them, first include `DYNAMIC_MACRO_ENABLE = yes` in your `rules.mk`. Then, add the following keys to your keymap: To enable them, first include `DYNAMIC_MACRO_ENABLE = yes` in your `rules.mk`. Then, add the following keys to your keymap:
|Key |Alias |Description | |Key |Alias |Description |
|------------------|----------|---------------------------------------------------| |---------------------------------|---------|--------------------------------------------------|
|`DYN_REC_START1` |`DM_REC1` |Start recording Macro 1 | |`QK_DYNAMIC_MACRO_RECORD_START_1`|`DM_REC1`|Start recording Macro 1 |
|`DYN_REC_START2` |`DM_REC2` |Start recording Macro 2 | |`QK_DYNAMIC_MACRO_RECORD_START_2`|`DM_REC2`|Start recording Macro 2 |
|`DYN_MACRO_PLAY1` |`DM_PLY1` |Replay Macro 1 | |`QK_DYNAMIC_MACRO_PLAY_1` |`DM_PLY1`|Replay Macro 1 |
|`DYN_MACRO_PLAY2` |`DM_PLY2` |Replay Macro 2 | |`QK_DYNAMIC_MACRO_PLAY_2` |`DM_PLY2`|Replay Macro 2 |
|`DYN_REC_STOP` |`DM_RSTP` |Finish the macro that is currently being recorded. | |`QK_DYNAMIC_MACRO_RECORD_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.|
That should be everything necessary. That should be everything necessary.
To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To start recording the macro, press either `DM_REC1` or `DM_REC2`.
To finish the recording, press the `DYN_REC_STOP` layer button. You can also press `DYN_REC_START1` or `DYN_REC_START2` again to stop the recording. To finish the recording, press the `DM_RSTP` layer button. You can also press `DM_REC1` or `DM_REC2` again to stop the recording.
To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. To replay the macro, press either `DM_PLY1` or `DM_PLY2`.
It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completely by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file. It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completely by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file.
@ -43,10 +43,10 @@ If the LEDs start blinking during the recording with each keypress, it means the
### DYNAMIC_MACRO_USER_CALL ### DYNAMIC_MACRO_USER_CALL
For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, add `#define DYNAMIC_MACRO_USER_CALL` to your `config.h` and insert the following snippet at the beginning of your `process_record_user()` function: For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DM_RSTP` key. If you want this behavior back, add `#define DYNAMIC_MACRO_USER_CALL` to your `config.h` and insert the following snippet at the beginning of your `process_record_user()` function:
```c ```c
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == MO(_DYN) ? DM_RSTP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) { if (!process_record_dynamic_macro(macro_kc, record)) {
return false; return false;

View File

@ -306,13 +306,13 @@ See also: [Caps Word](feature_caps_word.md)
See also: [Dynamic Macros](feature_dynamic_macros.md) See also: [Dynamic Macros](feature_dynamic_macros.md)
|Key |Aliases |Description | |Key |Aliases |Description |
|-----------------|---------|--------------------------------------------------| |---------------------------------|---------|--------------------------------------------------|
|`DYN_REC_START1` |`DM_REC1`|Start recording Macro 1 | |`QK_DYNAMIC_MACRO_RECORD_START_1`|`DM_REC1`|Start recording Macro 1 |
|`DYN_REC_START2` |`DM_REC2`|Start recording Macro 2 | |`QK_DYNAMIC_MACRO_RECORD_START_2`|`DM_REC2`|Start recording Macro 2 |
|`DYN_MACRO_PLAY1`|`DM_PLY1`|Replay Macro 1 | |`QK_DYNAMIC_MACRO_PLAY_1` |`DM_PLY1`|Replay Macro 1 |
|`DYN_MACRO_PLAY2`|`DM_PLY2`|Replay Macro 2 | |`QK_DYNAMIC_MACRO_PLAY_2` |`DM_PLY2`|Replay Macro 2 |
|`DYN_REC_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.| |`QK_DYNAMIC_MACRO_RECORD_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.|
## Grave Escape :id=grave-escape ## Grave Escape :id=grave-escape

View File

@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-------------------------------------------------------' `-------------------------------------------------------' * `-------------------------------------------------------' `-------------------------------------------------------'
*/ */
[_ADJUST] = LAYOUT( \ [_ADJUST] = LAYOUT( \
RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, KC_BSPC, \ RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP, KC_BSPC, \
QK_BOOT, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, QWERTY, GAME, XXXXXXX, XXXXXXX, XXXXXXX, \ QK_BOOT, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, QWERTY, GAME, XXXXXXX, XXXXXXX, XXXXXXX, \
KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \ KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \
DB_TOGG, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ DB_TOGG, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \

View File

@ -121,9 +121,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `------------------------------------------------------------------------------------' * `------------------------------------------------------------------------------------'
*/ */
[_ADJUST] = LAYOUT_ortho_4x12( [_ADJUST] = LAYOUT_ortho_4x12(
M_CUSTOM, QK_BOOT, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , M_CUSTOM, QK_BOOT, QWERTY, BL_ON, BL_OFF, DM_REC1, DM_REC2, _______, _______, _______, _______, KC_DEL ,
KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, QWERTY , KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DM_PLY1, DM_PLY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, QWERTY ,
TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, COLEMAK , TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DM_RSTP, DM_RSTP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, COLEMAK ,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
), ),

View File

@ -18,7 +18,7 @@ enum {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == MO(DYN) ? QK_DYNAMIC_MACRO_RECORD_STOP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) { if (!process_record_dynamic_macro(macro_kc, record)) {
return false; return false;
@ -85,11 +85,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
#define MacRec1 DYN_REC_START1 #define MacRec1 DM_REC1
#define MacRec2 DYN_REC_START2 #define MacRec2 DM_REC2
#define MacPla1 DYN_MACRO_PLAY1 #define MacPla1 DM_PLY1
#define MacPla2 DYN_MACRO_PLAY2 #define MacPla2 DM_PLY2
#define MacStop DYN_REC_STOP #define MacStop DM_RSTP
[DEF] = LAYOUT_60_iso_5x1u_split_rshift( [DEF] = LAYOUT_60_iso_5x1u_split_rshift(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,

View File

@ -124,9 +124,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_LALT, KC_LGUI, KC_TRNS, KC_TRNS, MO(_FN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_LALT, KC_LGUI, KC_TRNS, KC_TRNS, MO(_FN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
[_FN] = LAYOUT_65_ansi( [_FN] = LAYOUT_65_ansi(
DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, DM_RSTP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
KC_TRNS, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, DYN_MACRO_PLAY2, DYN_REC_START2, KC_TRNS, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, DM_PLY2, DM_REC2,
KC_TRNS, KC_BRID, KC_VOLD, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_HUI, DYN_MACRO_PLAY1, DYN_REC_START1, KC_TRNS, KC_BRID, KC_VOLD, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_HUI, DM_PLY1, DM_REC1,
KC_TRNS, TO(_MAIN), TO(_MAC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPD, RGB_SPI, KC_TRNS, RGB_VAI, KC_NO, KC_TRNS, TO(_MAIN), TO(_MAC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPD, RGB_SPI, KC_TRNS, RGB_VAI, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD
), ),

View File

@ -57,8 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
DEC_CLICK_SPEED,INC_CLICK_SPEED,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS DEC_CLICK_SPEED,INC_CLICK_SPEED,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
[_HYPER_LAYER] = LAYOUT_65_ansi( [_HYPER_LAYER] = LAYOUT_65_ansi(
DYN_REC_STOP, DYN_REC_START1, DYN_REC_START2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DM_RSTP, DM_REC1, DM_REC2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, DM_PLY1, DM_PLY2, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LSFT, KC_NO, KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LSFT, KC_NO, KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS

View File

@ -201,13 +201,13 @@ void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) {
keyrecord_t record; keyrecord_t record;
dprintf("macro_tap_dance_fn %d\n", state->count); dprintf("macro_tap_dance_fn %d\n", state->count);
if (is_macro1_recording) { if (is_macro1_recording) {
keycode = DYN_REC_STOP; keycode = DM_RSTP;
is_macro1_recording = false; is_macro1_recording = false;
layer_state_set_user(current_layer_state); layer_state_set_user(current_layer_state);
} else if (state->count == 1) { } else if (state->count == 1) {
keycode = DYN_MACRO_PLAY1; keycode = DM_PLY1;
} else { } else {
keycode = DYN_REC_START1; keycode = DM_REC1;
is_macro1_recording = true; is_macro1_recording = true;
layer_state_set_user(current_layer_state); layer_state_set_user(current_layer_state);
} }

View File

@ -109,13 +109,13 @@ void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) {
keyrecord_t record; keyrecord_t record;
dprintf("macro_tap_dance_fn %d\n", state->count); dprintf("macro_tap_dance_fn %d\n", state->count);
if (is_macro1_recording) { if (is_macro1_recording) {
keycode = DYN_REC_STOP; keycode = DM_RSTP;
is_macro1_recording = false; is_macro1_recording = false;
layer_state_set_user(current_layer_state); layer_state_set_user(current_layer_state);
} else if (state->count == 1) { } else if (state->count == 1) {
keycode = DYN_MACRO_PLAY1; keycode = DM_PLY1;
} else { } else {
keycode = DYN_REC_START1; keycode = DM_REC1;
is_macro1_recording = true; is_macro1_recording = true;
layer_state_set_user(current_layer_state); layer_state_set_user(current_layer_state);
} }

View File

@ -7,13 +7,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// ESCAPE | | | | | | START RECORDING // // ESCAPE | | | | | | START RECORDING //
// | | | | | | // // | | | | | | //
KC_ESC, TD(GRV_TILD), TD(AT_DLR), TD(LCBR_LABK), TD(LPRN_LBRC), TD(EXLM_QUES), DYN_REC_START1, // KC_ESC, TD(GRV_TILD), TD(AT_DLR), TD(LCBR_LABK), TD(LPRN_LBRC), TD(EXLM_QUES), DM_REC1, //
// | ~ | $ | < | [ | ? | // // | ~ | $ | < | [ | ? | //
// | TAP DANCE: ` | TAP DANCE: @ TAP DANCE: { | TAP DANCE: ( | TAP DANCE: ! | DYNAMIC MARCO 1 // // | TAP DANCE: ` | TAP DANCE: @ TAP DANCE: { | TAP DANCE: ( | TAP DANCE: ! | DYNAMIC MARCO 1 //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// TAB | MOD TAP: ALT+SHIFT | MOD TAP: CTRL+ALT | MOD TAP: CTRL+SHIFT | P | Y | // // TAB | MOD TAP: ALT+SHIFT | MOD TAP: CTRL+ALT | MOD TAP: CTRL+SHIFT | P | Y | //
// | | | | | | // // | | | | | | //
KC_TAB, TD(NONE_LEAD), TD(QUOT_DQUO), TD(DOT_COMM), LCG_T(KC_P), LAG_T(KC_Y), DYN_MACRO_PLAY1, // KC_TAB, TD(NONE_LEAD), TD(QUOT_DQUO), TD(DOT_COMM), LCG_T(KC_P), LAG_T(KC_Y), DM_PLY1, //
// | LEAD | " | , | | | // // | LEAD | " | , | | | //
// | TAP DANCE: NONE | TAP DANCE: ' | TAP DANCE: . | MOD TAP: CTRL+GUI | MOD TAP: ALT+GUI | // // | TAP DANCE: NONE | TAP DANCE: ' | TAP DANCE: . | MOD TAP: CTRL+GUI | MOD TAP: ALT+GUI | //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| PLAY DYNAMIC MACRO 1 // //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| PLAY DYNAMIC MACRO 1 //
@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| META // //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| META //
// STOP RECORDING | MOD TAP: GUI+SHIFT+ALT | Q | J | K | X | // // STOP RECORDING | MOD TAP: GUI+SHIFT+ALT | Q | J | K | X | //
// | | | | | | // // | | | | | | //
DYN_REC_STOP, TD(SCLN_COLN), LCAG_T(KC_Q), TD(J_MED_MEH), TD(K_NUM_HYP), LCSG_T(KC_X), KC_LGUI, // DM_RSTP, TD(SCLN_COLN), LCAG_T(KC_Q), TD(J_MED_MEH), TD(K_NUM_HYP), LCSG_T(KC_X), KC_LGUI, //
// | : | | | | | // // | : | | | | | //
// DYNAMIC MACRO | TAP DANCE: ; | MOD TAP: SHIFT+GUI | M TAP DANCE: MEDIA/MEH | M TAP DANCE: ATM/HYPER | MOD TAP: CTL+SHIFT+GUI | // // DYNAMIC MACRO | TAP DANCE: ; | MOD TAP: SHIFT+GUI | M TAP DANCE: MEDIA/MEH | M TAP DANCE: ATM/HYPER | MOD TAP: CTL+SHIFT+GUI | //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
@ -63,13 +63,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// | | | | | | // // | | | | | | //
// | | | | | | // // | | | | | | //
DYN_REC_START2, TD(APMR_PIPE), TD(RPRN_RBRC), TD(RCBR_RABK), TD(HASH_PERC), TD(ASTR_CIRC), XXXXXXX, // DM_REC2, TD(APMR_PIPE), TD(RPRN_RBRC), TD(RCBR_RABK), TD(HASH_PERC), TD(ASTR_CIRC), XXXXXXX, //
// | | | | | | // // | | | | | | //
// | | | | | | // // | | | | | | //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// | | | | | | // // | | | | | | //
// | | | | | | // // | | | | | | //
DYN_MACRO_PLAY2, LAG_T(KC_F), LCG_T(KC_G), C_S_T(KC_C), LCA_T(KC_R), LAS_T(KC_L), TD(SLSH_BSLS), // DM_PLY2, LAG_T(KC_F), LCG_T(KC_G), C_S_T(KC_C), LCA_T(KC_R), LAS_T(KC_L), TD(SLSH_BSLS), //
// | | | | | | // // | | | | | | //
// | | | | | | // // | | | | | | //
// |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// // |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//

View File

@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_FN] = LAYOUT_60_ansi_split_bs_rshift( /* Layer 2 */ [_FN] = LAYOUT_60_ansi_split_bs_rshift( /* Layer 2 */
KC_GRAVE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_INS , KC_DEL , \ KC_GRAVE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_INS , KC_DEL , \
KC_CAPS , KC_VOLD , KC_MUTE , KC_VOLU , DYN_REC_START1 , DYN_MACRO_PLAY1 , DYN_REC_STOP , KC_PGUP , KC_HOME , ______ , KC_PSCR , KC_UP , ______ , KC_DEL , \ KC_CAPS , KC_VOLD , KC_MUTE , KC_VOLU , DM_REC1 , DM_PLY1 , DM_RSTP , KC_PGUP , KC_HOME , ______ , KC_PSCR , KC_UP , ______ , KC_DEL , \
KC_LCTL , KC_END , ______ , KC_PGDN , ______ , ______ , KC_LEFT , KC_DOWN , KC_UP , KC_RIGHT , KC_LEFT , KC_RGHT , KC_ENT , \ KC_LCTL , KC_END , ______ , KC_PGDN , ______ , ______ , KC_LEFT , KC_DOWN , KC_UP , KC_RIGHT , KC_LEFT , KC_RGHT , KC_ENT , \
KC_LSFT , KC_MPRV , KC_MPLY , KC_MNXT , BL_DEC , BL_TOGG , BL_INC , ______ , ______ , ______ , KC_DOWN , KC_RSFT , TO(_DEFAULT) , \ KC_LSFT , KC_MPRV , KC_MPLY , KC_MNXT , BL_DEC , BL_TOGG , BL_INC , ______ , ______ , ______ , KC_DOWN , KC_RSFT , TO(_DEFAULT) , \
______ , ______ , KC_LALT , KC_SPC , KC_RALT , QK_BOOT , ______ , ______ \ ______ , ______ , KC_LALT , KC_SPC , KC_RALT , QK_BOOT , ______ , ______ \

View File

@ -22,11 +22,11 @@ extern backlight_config_t backlight_config;
#include "dynamic_macro.h" #include "dynamic_macro.h"
#define FN_CAPS LT(_FL, KC_CAPS) #define FN_CAPS LT(_FL, KC_CAPS)
#define KC_DMR1 DYN_REC_START1 #define KC_DMR1 DM_REC1
#define KC_DMR2 DYN_REC_START2 #define KC_DMR2 DM_REC2
#define KC_DMP1 DYN_MACRO_PLAY1 #define KC_DMP1 DM_PLY1
#define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMP2 DM_PLY2
#define KC_DMRS DYN_REC_STOP #define KC_DMRS DM_RSTP
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*#### _BL: Base Layer - Standard TKL QWERTY layout. /*#### _BL: Base Layer - Standard TKL QWERTY layout.

View File

@ -122,9 +122,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------------------------------------------------------------------------------------' * `--------------------------------------------------------------------------------------------------'
*/ */
[_ADJUST] = LAYOUT( [_ADJUST] = LAYOUT(
M_CUSTOM, QK_BOOT, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , M_CUSTOM, QK_BOOT, QWERTY, _______, _______, DM_REC1, DM_REC2, _______, _______, _______, _______, KC_DEL ,
KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, QWERTY , KC_CAPS, _______, _______, _______, _______, DM_PLY1, DM_PLY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, QWERTY ,
TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, COLEMAK , TG(_MAC), _______, _______, _______, _______, DM_RSTP, DM_RSTP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, COLEMAK ,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
), ),

View File

@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[UTIL] = LAYOUT( [UTIL] = LAYOUT(
QK_BOOT, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DB_TOGG, QK_BOOT, DM_PLY1, DM_PLY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DB_TOGG,
____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, ____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____,
____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, ____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____,
____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____,
@ -154,9 +154,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[MREC] = LAYOUT( [MREC] = LAYOUT(
____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, DM_REC1, DM_REC2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, DM_RSTP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____) ____, ____, ____, ____, ____)

View File

@ -75,15 +75,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[DYN] = LAYOUT( [DYN] = LAYOUT(
KC_TRNS, DYN_REC_START1, DYN_REC_START2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_TRNS, DM_REC1, DM_REC2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DM_PLY1, DM_PLY2,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACSLEEP, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACSLEEP, KC_HOME, KC_END, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_TRNS, KC_TRNS)}; KC_TRNS, KC_TRNS, DM_RSTP, KC_TRNS, KC_TRNS)};
bool process_record_user(uint16_t keycode, keyrecord_t *record) bool process_record_user(uint16_t keycode, keyrecord_t *record)
{ {
uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == MO(DYN) ? DM_RSTP : keycode);
if (!process_dynamic_macro(macro_kc, record)) if (!process_dynamic_macro(macro_kc, record))
{ {
return false; return false;

View File

@ -50,8 +50,8 @@ enum custom_keycodes {
/* Additional custom keycodes */ /* Additional custom keycodes */
#define MO_HHKB MO(_HHKB) #define MO_HHKB MO(_HHKB)
#define LT_SPFN LT(_SPACE_FN, KC_SPC) #define LT_SPFN LT(_SPACE_FN, KC_SPC)
#define DM_STA1 DYN_REC_START1 #define DM_STA1 DM_REC1
#define DM_PLY1 DYN_MACRO_PLAY1 #define DM_PLY1 DM_PLY1
/* User settings structure for the EEPROM */ /* User settings structure for the EEPROM */
typedef union { typedef union {

View File

@ -22,11 +22,11 @@ extern backlight_config_t backlight_config;
#include "dynamic_macro.h" #include "dynamic_macro.h"
#define FN_CAPS LT(_FL, KC_CAPS) #define FN_CAPS LT(_FL, KC_CAPS)
#define KC_DMR1 DYN_REC_START1 #define KC_DMR1 DM_REC1
#define KC_DMR2 DYN_REC_START2 #define KC_DMR2 DM_REC2
#define KC_DMP1 DYN_MACRO_PLAY1 #define KC_DMP1 DM_PLY1
#define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMP2 DM_PLY2
#define KC_DMRS DYN_REC_STOP #define KC_DMRS DM_RSTP
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*#### _BL: Base Layer - Standard TKL QWERTY layout. /*#### _BL: Base Layer - Standard TKL QWERTY layout.

View File

@ -22,11 +22,11 @@ extern backlight_config_t backlight_config;
#include "dynamic_macro.h" #include "dynamic_macro.h"
#define FN_CAPS LT(_FL, KC_CAPS) #define FN_CAPS LT(_FL, KC_CAPS)
#define KC_DMR1 DYN_REC_START1 #define KC_DMR1 DM_REC1
#define KC_DMR2 DYN_REC_START2 #define KC_DMR2 DM_REC2
#define KC_DMP1 DYN_MACRO_PLAY1 #define KC_DMP1 DM_PLY1
#define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMP2 DM_PLY2
#define KC_DMRS DYN_REC_STOP #define KC_DMRS DM_RSTP
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*#### _BL: Base Layer - Mostly standard 65% QWERTY layout. /*#### _BL: Base Layer - Mostly standard 65% QWERTY layout.

View File

@ -74,8 +74,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[_ADJUST] = LAYOUT( \ [_ADJUST] = LAYOUT( \
_______, QK_BOOT, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______, \ _______, QK_BOOT, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, _______, KC_PSCR, _______, _______, \
_______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______, \ _______, _______, _______, _______, USEFNMODS, _______, _______, DM_PLY1, DM_PLY2, MACSLEEP, _______, _______, \
_______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______, \
XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, __MOD__, __MOD__, XXXXXXX \ XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, __MOD__, __MOD__, XXXXXXX \
) )
@ -91,7 +91,7 @@ static bool singular_key = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) bool process_record_user(uint16_t keycode, keyrecord_t *record)
{ {
uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == MO(_ADJUST) ? DM_RSTP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) if (!process_record_dynamic_macro(macro_kc, record))
{ {
return false; return false;

View File

@ -31,8 +31,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
QK_BOOT, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCRL, KC_PAUS, QK_BOOT, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCRL, KC_PAUS,
KC_TRNS, MACRO1, MACRO2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACRO1, MACRO2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
MACROTAB, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUBS, KC_TRNS, MACROTAB, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUBS, KC_TRNS,
KC_TRNS, VK_TOGG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START2, DYN_MACRO_PLAY2, KC_TRNS, KC_TRNS, KC_TRNS, VK_TOGG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, DM_REC2, DM_PLY2, KC_TRNS, KC_TRNS,
KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_STOP, DYN_REC_START1, DYN_MACRO_PLAY1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, DM_RSTP, DM_REC1, DM_PLY1, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_DEL), KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_DEL), KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS
), ),
[_NUMPAD] = LAYOUT_ansi_1u( [_NUMPAD] = LAYOUT_ansi_1u(

View File

@ -105,8 +105,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_FN] = LAYOUT_ortho_4x12( [_FN] = LAYOUT_ortho_4x12(
_______, BL_STEP, _______, KC_SLEP, _______, _______, _______, DYN_REC_START1, DYN_MACRO_PLAY1, DYN_REC_STOP, _______, KC_VOLU, _______, BL_STEP, _______, KC_SLEP, _______, _______, _______, DM_REC1, DM_PLY1, DM_RSTP, _______, KC_VOLU,
_______, VK_TOGG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, KC_VOLD, _______, VK_TOGG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, DM_REC2, DM_PLY2, _______, _______, KC_VOLD,
_______, RGB_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, KC_MSTP, KC_MUTE, _______, RGB_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, KC_MSTP, KC_MUTE,
QK_BOOT, _______, _______, _______, _______, LCA(KC_DEL), LCA(KC_INS), _______, _______, KC_MPRV, KC_MPLY, KC_MNXT QK_BOOT, _______, _______, _______, _______, LCA(KC_DEL), LCA(KC_INS), _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
) )

View File

@ -31,11 +31,11 @@ enum custom_keycodes {
#include "dynamic_macro.h" #include "dynamic_macro.h"
#define DREC_1 DYN_REC_START1 #define DREC_1 DM_REC1
#define DREC_2 DYN_REC_START2 #define DREC_2 DM_REC2
#define DPLAY_1 DYN_MACRO_PLAY1 #define DPLAY_1 DM_PLY1
#define DPLAY_2 DYN_MACRO_PLAY2 #define DPLAY_2 DM_PLY2
#define DSTOP DYN_REC_STOP #define DSTOP DM_RSTP
// Mod Tap Definitions // Mod Tap Definitions

View File

@ -27,11 +27,11 @@ extern backlight_config_t backlight_config;
#include "dynamic_macro.h" #include "dynamic_macro.h"
#define FN_ZERO LT(_L9, KC_KP_0) #define FN_ZERO LT(_L9, KC_KP_0)
#define KC_DMR1 DYN_REC_START1 #define KC_DMR1 DM_REC1
#define KC_DMR2 DYN_REC_START2 #define KC_DMR2 DM_REC2
#define KC_DMP1 DYN_MACRO_PLAY1 #define KC_DMP1 DM_PLY1
#define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMP2 DM_PLY2
#define KC_DMRS DYN_REC_STOP #define KC_DMRS DM_RSTP
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*## Layout Config: /*## Layout Config:

View File

@ -72,8 +72,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_VOLD,KC_VOLU, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC, KC_DEL, KC_VOLD,KC_VOLU, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC, KC_DEL,
KC_MPRV,KC_MNXT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, KC_MPRV,KC_MNXT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
KC_HOME,KC_END, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENTER, KC_PGUP, KC_HOME,KC_END, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENTER, KC_PGUP,
DYN_MACRO_PLAY1,KC_MUTE,KC_LSFT,KC_Z,KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(GIT,KC_SLSH), KC_RSFT, KC_UP, KC_PGDN, DM_PLY1,KC_MUTE,KC_LSFT,KC_Z,KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(GIT,KC_SLSH), KC_RSFT, KC_UP, KC_PGDN,
DYN_REC_STOP,DYN_REC_START1,KC_LCTL, KC_LGUI, KC_LALT, LT(MEDIA,KC_SPC), LT(COMBOS,KC_BSPC), LT(NAV,KC_APP), LT(LAYOUT_CHG, KC_ENTER),KC_RALT,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT DM_RSTP,DM_REC1,KC_LCTL, KC_LGUI, KC_LALT, LT(MEDIA,KC_SPC), LT(COMBOS,KC_BSPC), LT(NAV,KC_APP), LT(LAYOUT_CHG, KC_ENTER),KC_RALT,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
), ),
/* Base ,-----------------------------------------. ,-----------------------------------------------------. /* Base ,-----------------------------------------. ,-----------------------------------------------------.

View File

@ -161,8 +161,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_MEDIA] = LAYOUT_planck_grid( [_MEDIA] = LAYOUT_planck_grid(
XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX,
XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_PLY1, DM_PLY2,
KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DYN_REC_STOP, KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DM_RSTP,
ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY
), ),
@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_ONESHOT] = LAYOUT_planck_grid( [_ONESHOT] = LAYOUT_planck_grid(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
), ),
@ -221,16 +221,16 @@ void press_key(uint16_t key) {
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// uint16_t macro_kc = (keycode == ONESHOT ? DYN_REC_STOP : keycode); // uint16_t macro_kc = (keycode == ONESHOT ? DM_RSTP : keycode);
if (!process_record_dynamic_macro(keycode, record)) { if (!process_record_dynamic_macro(keycode, record)) {
switch(keycode) { switch(keycode) {
case DYN_REC_START1: case QK_DYNAMIC_MACRO_RECORD_START_1:
case DYN_REC_START2: case QK_DYNAMIC_MACRO_RECORD_START_2:
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_SONG(tone_dyn_macro_rec); PLAY_SONG(tone_dyn_macro_rec);
#endif #endif
break; break;
case DYN_REC_STOP: case QK_DYNAMIC_MACRO_RECORD_STOP:
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_SONG(tone_dyn_macro_stop); PLAY_SONG(tone_dyn_macro_stop);
#endif #endif

View File

@ -124,10 +124,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
), ),
[_DYN] = LAYOUT_planck_grid( [_DYN] = LAYOUT_planck_grid(
_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, _______ ,
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______ _______ , _______, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, _______
) )
}; };
@ -151,7 +151,7 @@ void persistant_default_layer_set(uint16_t default_layer) {
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == MO(_DYN) ? DM_RSTP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) { if (!process_record_dynamic_macro(macro_kc, record)) {
return false; return false;
} }

View File

@ -63,8 +63,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_FKEYS] = LAYOUT_planck_grid( [_FKEYS] = LAYOUT_planck_grid(
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2, KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DM_REC1, DM_REC2,
_______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, DYN_REC_STOP, _______, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, _______, DM_RSTP,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
), ),
@ -123,10 +123,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
) /*, ) /*,
[_DYN] = LAYOUT_planck_grid( [_DYN] = LAYOUT_planck_grid(
_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, _______ ,
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______ _______ , _______, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, _______
)*/ )*/
}; };
@ -150,7 +150,7 @@ void persistant_default_layer_set(uint16_t default_layer) {
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint16_t macro_kc = (keycode == FKEYS ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == FKEYS ? DM_RSTP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) { if (!process_record_dynamic_macro(macro_kc, record)) {
return false; return false;
} }

View File

@ -82,8 +82,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______ _______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______
), ),
[_DYN] = LAYOUT_planck_mit( /* special */ [_DYN] = LAYOUT_planck_mit( /* special */
KM_HOLD, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, KC_PAUS, KM_HOLD, DM_REC1, DM_PLY1, _______, _______, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, KC_PAUS,
QK_LOCK, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SCRL, KC_NUM, QK_LOCK, DM_REC2, DM_PLY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SCRL, KC_NUM,
KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, KM_PP_GAME, DF(_QW), DF(_PP), _______, _______, _______, _______ _______, _______, _______, _______, KM_PP_GAME, DF(_QW), DF(_PP), _______, _______, _______, _______
), ),
@ -103,7 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint16_t key_timer; static uint16_t key_timer;
static uint8_t ignore_up_events = 0; static uint8_t ignore_up_events = 0;
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == MO(_DYN) ? DM_RSTP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) { if (!process_record_dynamic_macro(macro_kc, record)) {
return false; return false;
} }

View File

@ -264,7 +264,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
} }
// Sound when Dynamic recording started // Sound when Dynamic recording started
case DYN_REC_START1: case QK_DYNAMIC_MACRO_RECORD_START_1:
// If pressed // If pressed
if (record->event.pressed) { if (record->event.pressed) {
@ -279,7 +279,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
} }
// Sound when Dynamic recording stopped // Sound when Dynamic recording stopped
case DYN_REC_STOP: case QK_DYNAMIC_MACRO_RECORD_STOP:
// If pressed // If pressed
if (record->event.pressed) { if (record->event.pressed) {
@ -336,7 +336,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// lower key // lower key
[_LOWER] = LAYOUT_ortho_5x12 ( [_LOWER] = LAYOUT_ortho_5x12 (
DYN_MACRO_PLAY1, DYN_REC_START1, DYN_REC_STOP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DM_PLY1, DM_REC1, DM_RSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_BSPC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_QUOT, KC_GRV, KC_LCBR, KC_RCBR, KC_TRNS, KC_BSPC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_QUOT, KC_GRV, KC_LCBR, KC_RCBR, KC_TRNS,
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_TRNS, KC_BSLS, KC_TRNS,
@ -345,7 +345,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// raise key // raise key
[_RAISE] = LAYOUT_ortho_5x12 ( [_RAISE] = LAYOUT_ortho_5x12 (
DYN_MACRO_PLAY1, DYN_REC_START1, DYN_REC_STOP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DM_PLY1, DM_REC1, DM_RSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_DQUO, KC_TILD, KC_LBRC, KC_RBRC, KC_TRNS, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_DQUO, KC_TILD, KC_LBRC, KC_RBRC, KC_TRNS,
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS , KC_TRNS, KC_PIPE, KC_TRNS, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS , KC_TRNS, KC_PIPE, KC_TRNS,

View File

@ -6,11 +6,11 @@
#include "../../rev3/config.h" #include "../../rev3/config.h"
#include "../../rev3/rev3.h" #include "../../rev3/rev3.h"
enum dynamic_macro_keycodes { enum dynamic_macro_keycodes {
DYN_REC_START1 = DYNAMIC_MACRO_RANGE, DM_REC1 = DYNAMIC_MACRO_RANGE,
DYN_REC_START2, DM_REC2,
DYN_REC_STOP, DM_RSTP,
DYN_MACRO_PLAY1, DM_PLY1,
DYN_MACRO_PLAY2, DM_PLY2,
}; };
#define QMK_KEYBOARD_H "rev3.h" #define QMK_KEYBOARD_H "rev3.h"
#endif #endif
@ -258,8 +258,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_SCRL, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_SCRL, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_TAB, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, KC_AMPR, KC_ASTR, KC_LCBR, KC_RCBR, KC_DEL, KC_TAB, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, KC_AMPR, KC_ASTR, KC_LCBR, KC_RCBR, KC_DEL,
KC_CAPS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_CAPS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX,
_______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, KC_NUHS, KC_NUBS, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, KC_NUHS, KC_NUBS, DM_REC1, DM_REC2, DM_RSTP,
KC_LCTL, KC_LALT, KC_LGUI, _______, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, __LYB__, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, LLSWIT KC_LCTL, KC_LALT, KC_LGUI, _______, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, __LYB__, DM_PLY1, DM_PLY2, LLSWIT
), ),
/* Adjust (Lower + Raise) /* Adjust (Lower + Raise)
@ -322,8 +322,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, _______, KC_ESC, _______, _______, _______, _______, KC_SCRL, _______, _______, _______, _______, _______, _______,
KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, DM_RSTP,
KC_LCTL, KC_LALT, KC_LGUI, KC_DEL, KC_BSPC, KC_SPC, KC_SPC, __LYB__, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, LLSWIT KC_LCTL, KC_LALT, KC_LGUI, KC_DEL, KC_BSPC, KC_SPC, KC_SPC, __LYB__, _______, DM_PLY1, DM_PLY2, LLSWIT
), ),
/* Numeric Pad /* Numeric Pad
@ -419,7 +419,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Play sound on Macro stop // Play sound on Macro stop
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
switch (keycode) { switch (keycode) {
case DYN_REC_STOP: case QK_DYNAMIC_MACRO_RECORD_STOP:
if (record->event.pressed) { if (record->event.pressed) {
PLAY_SONG(tone_macro_record_stop); PLAY_SONG(tone_macro_record_stop);
} }
@ -506,13 +506,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break; break;
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
// Play sound on Macro record start // Play sound on Macro record start
case DYN_REC_START1: case QK_DYNAMIC_MACRO_RECORD_START_1:
if (record->event.pressed) { if (record->event.pressed) {
PLAY_SONG(tone_macro1_record); PLAY_SONG(tone_macro1_record);
} }
return false; return false;
break; break;
case DYN_REC_START2: case QK_DYNAMIC_MACRO_RECORD_START_2:
if (record->event.pressed) { if (record->event.pressed) {
PLAY_SONG(tone_macro2_record); PLAY_SONG(tone_macro2_record);
} }

View File

@ -66,9 +66,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, MO(_DYN) \ _______, MO(_DYN) \
), ),
[_DYN] = LAYOUT_numpad_4x4( /* DYNAMIC MACRO */ [_DYN] = LAYOUT_numpad_4x4( /* DYNAMIC MACRO */
DYN_REC_START1, DYN_REC_START2, _______, DYN_REC_STOP, \ DM_REC1, DM_REC2, _______, DM_RSTP, \
_______, _______, _______, \ _______, _______, _______, \
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \ DM_PLY1, DM_PLY2, _______, _______, \
_______, _______ \ _______, _______ \
), ),
}; };

View File

@ -64,9 +64,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______ _______, _______
), ),
[_DYN] = LAYOUT_numpad_4x4( /* DYNAMIC MACRO */ [_DYN] = LAYOUT_numpad_4x4( /* DYNAMIC MACRO */
DYN_REC_START1, DYN_REC_START2, _______, _______, \ DM_REC1, DM_REC2, _______, _______, \
_______, _______, _______, \ _______, _______, _______, \
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \ DM_PLY1, DM_PLY2, _______, _______, \
_______, _______ _______, _______
), ),
}; };

View File

@ -46,8 +46,8 @@
// "MMENU" is a macro for "CMD+SPC" (aka Spotlight/Alfred) // "MMENU" is a macro for "CMD+SPC" (aka Spotlight/Alfred)
#define MMENU LGUI(KC_SPC) #define MMENU LGUI(KC_SPC)
#define _____ KC_TRNS #define _____ KC_TRNS
#define MM_0 DYN_MACRO_PLAY1 #define MM_0 DM_PLY1
#define MM_1 DYN_MACRO_PLAY2 #define MM_1 DM_PLY2
// tap-hold settings // tap-hold settings
#define LONGPRESS_DELAY 250 #define LONGPRESS_DELAY 250
@ -114,8 +114,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[LAYER_RECORD] = LAYOUT( [LAYER_RECORD] = LAYOUT(
_____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, DM_RSTP, DM_RSTP, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, DM_RSTP, DM_RSTP, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____
@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[LAYER_FN] = LAYOUT( [LAYER_FN] = LAYOUT(
GOTO_CM, GOTO_QW, KC_NO, KC_NO, KC_NO, KC_NO, DYN_REC_START1, DYN_REC_START2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, GOTO_CM, GOTO_QW, KC_NO, KC_NO, KC_NO, KC_NO, DM_REC1, DM_REC2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
@ -221,7 +221,7 @@ bool did_record_m1 = false;
bool did_record_m2 = false; bool did_record_m2 = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool try_dynamic_macro = true; bool try_dynamic_macro = true;
if ((keycode == DYN_MACRO_PLAY1 && !did_record_m1) || (keycode == DYN_MACRO_PLAY2 && !did_record_m2)) { if ((keycode == QK_DYNAMIC_MACRO_PLAY_1 && !did_record_m1) || (keycode == QK_DYNAMIC_MACRO_PLAY_2 && !did_record_m2)) {
try_dynamic_macro = false; try_dynamic_macro = false;
} }
else if (keycode == DM_CLEAR) { else if (keycode == DM_CLEAR) {
@ -231,18 +231,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
if (try_dynamic_macro && !process_record_dynamic_macro(keycode, record)) { if (try_dynamic_macro && !process_record_dynamic_macro(keycode, record)) {
if (keycode == DYN_MACRO_PLAY1) { if (keycode == QK_DYNAMIC_MACRO_PLAY_1) {
did_record_m1 = true; did_record_m1 = true;
} }
if (keycode == DYN_MACRO_PLAY2) { if (keycode == QK_DYNAMIC_MACRO_PLAY_2) {
did_record_m2 = true; did_record_m2 = true;
} }
if (keycode == DYN_REC_START1 || keycode == DYN_REC_START2) { if (keycode == QK_DYNAMIC_MACRO_RECORD_START_1 || keycode == QK_DYNAMIC_MACRO_RECORD_START_2) {
layer_move(LAYER_RECORD); layer_move(LAYER_RECORD);
} }
else if (keycode == DYN_REC_STOP) { else if (keycode == QK_DYNAMIC_MACRO_RECORD_STOP) {
layer_move(LAYER_COLEMAK); layer_move(LAYER_COLEMAK);
} }
@ -250,10 +250,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
switch (keycode) { switch (keycode) {
case DYN_MACRO_PLAY1: case QK_DYNAMIC_MACRO_PLAY_1:
SEND_STRING(SENDSTRING_MM0); SEND_STRING(SENDSTRING_MM0);
return false; return false;
case DYN_MACRO_PLAY2: case QK_DYNAMIC_MACRO_PLAY_2:
SEND_STRING(SENDSTRING_MM1); SEND_STRING(SENDSTRING_MM1);
return false; return false;
case MM_2: case MM_2:

View File

@ -23,7 +23,7 @@ I've implemented my own "tap/hold" feature, identical in spirit to "Space Cadet"
The function layer is only to switch to Qwerty (so other people can use this keyboard - also turns off sticky keys) and to start recording keypresses. The function layer is only to switch to Qwerty (so other people can use this keyboard - also turns off sticky keys) and to start recording keypresses.
I implemented "stop recording" in a unique way; starting a macro recording sends the keyboard layer to one that has all the macro keys assigned to `DYN_REC_STOP`, and restores the layer to the default when recording is stopped. I implemented "stop recording" in a unique way; starting a macro recording sends the keyboard layer to one that has all the macro keys assigned to `DM_RSTP`, and restores the layer to the default when recording is stopped.
I wish Dynamic Macros supported more, because I'd like to record a third macro in the MACRO slot instead of hardcoding it. I'm using these to store some passwords. I wish Dynamic Macros supported more, because I'd like to record a third macro in the MACRO slot instead of hardcoding it. I'm using these to store some passwords.

View File

@ -40,17 +40,17 @@ void macro_tog_key( qk_tap_dance_state_t *state, void *user_data ) {
keyrecord_t kr; keyrecord_t kr;
kr.event.pressed = false; kr.event.pressed = false;
uint16_t action = DYN_REC_STOP; uint16_t action = QK_DYNAMIC_MACRO_RECORD_STOP;
if ( state->count == 1 ) { if ( state->count == 1 ) {
action = DYN_MACRO_PLAY1; action = QK_DYNAMIC_MACRO_PLAY_1;
} }
else if ( state->count == 2 ) { else if ( state->count == 2 ) {
action = DYN_REC_STOP; action = QK_DYNAMIC_MACRO_RECORD_STOP;
kr.event.pressed = true; kr.event.pressed = true;
} }
else if ( state->count == 3 ) { else if ( state->count == 3 ) {
action = DYN_REC_START1; action = QK_DYNAMIC_MACRO_RECORD_START_1;
} }
process_record_dynamic_macro( action, &kr ); process_record_dynamic_macro( action, &kr );

View File

@ -7,9 +7,9 @@ enum custom_keycodes {
#include "dynamic_macro.h" #include "dynamic_macro.h"
#define KC_REC DYN_REC_START1 #define KC_REC DM_REC1
#define KC_DONE DYN_REC_STOP #define KC_DONE DM_RSTP
#define KC_PLAY DYN_MACRO_PLAY1 #define KC_PLAY DM_PLY1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

View File

@ -103,17 +103,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
DYN_REC_START1, DM_REC1,
KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, KC_TRNS, KC_TRNS, DM_PLY1,
/* right hand */ /* right hand */
KC_TRNS, KC_TRNS, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_TRNS,
KC_EQL, M_LAMBDA, KC_7, KC_8, KC_9, KC_PLUS, KC_TRNS, KC_EQL, M_LAMBDA, KC_7, KC_8, KC_9, KC_PLUS, KC_TRNS,
M_POINER, KC_4, KC_5, KC_6, KC_0, KC_TRNS, M_POINER, KC_4, KC_5, KC_6, KC_0, KC_TRNS,
KC_ENT, M_NOT_EQL, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_ENT, M_NOT_EQL, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS,
KC_0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS,
KC_TRNS, DYN_REC_STOP, KC_TRNS, DM_RSTP,
DYN_REC_START2, DM_REC2,
DYN_MACRO_PLAY2, KC_TRNS, KC_TRNS DM_PLY2, KC_TRNS, KC_TRNS
), ),
/* Keymap 2: Left side -> LAYER_NUM, Right side -> Shift + LAYER_BASE /* Keymap 2: Left side -> LAYER_NUM, Right side -> Shift + LAYER_BASE
* *
@ -145,8 +145,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
DYN_REC_START1, DM_REC1,
KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, KC_TRNS, KC_TRNS, DM_PLY1,
/* right hand */ /* right hand */
TG(1), KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, S(KC_MINS), S(KC_BSPC), TG(1), KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, S(KC_MINS), S(KC_BSPC),
KC_UNDS, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), S(KC_SCLN), S(KC_BSLS), KC_UNDS, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), S(KC_SCLN), S(KC_BSLS),
@ -195,9 +195,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
M_POINER, KC_4, KC_5, KC_6, KC_0, KC_TRNS, M_POINER, KC_4, KC_5, KC_6, KC_0, KC_TRNS,
KC_ENT, M_NOT_EQL, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_ENT, M_NOT_EQL, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS,
KC_0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS,
KC_TRNS, DYN_REC_STOP, KC_TRNS, DM_RSTP,
DYN_REC_START2, DM_REC2,
DYN_MACRO_PLAY2, KC_TRNS, KC_TRNS DM_PLY2, KC_TRNS, KC_TRNS
), ),
}; };
@ -206,13 +206,13 @@ static bool recording_dynamic_macro;
static bool process_record_dynamic_macro_wrapper(uint16_t keycode, keyrecord_t *record) { static bool process_record_dynamic_macro_wrapper(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
/* detect dynamic macro recording state */ /* detect dynamic macro recording state */
case DYN_REC_START1: case QK_DYNAMIC_MACRO_RECORD_START_1:
case DYN_REC_START2: case QK_DYNAMIC_MACRO_RECORD_START_2:
if (record->event.pressed) { if (record->event.pressed) {
recording_dynamic_macro = true; recording_dynamic_macro = true;
} }
break; break;
case DYN_REC_STOP: case QK_DYNAMIC_MACRO_RECORD_STOP:
if (record->event.pressed) { if (record->event.pressed) {
recording_dynamic_macro = false; recording_dynamic_macro = false;
} }

View File

@ -282,11 +282,11 @@ enum custom_keycodes {
# include "dynamic_macro.h" # include "dynamic_macro.h"
#else #else
/* avoid ifdef's in keymap */ /* avoid ifdef's in keymap */
# define DYN_REC_START1 KC_TRNS # define DM_REC1 KC_TRNS
# define DYN_REC_START2 KC_TRNS # define DM_REC2 KC_TRNS
# define DYN_MACRO_PLAY1 KC_TRNS # define DM_PLY1 KC_TRNS
# define DYN_MACRO_PLAY2 KC_TRNS # define DM_PLY2 KC_TRNS
# define DYN_REC_STOP KC_TRNS # define DM_RSTP KC_TRNS
#endif #endif
#ifdef CFQ_USE_MOMENTARY_LAYER_KEYS #ifdef CFQ_USE_MOMENTARY_LAYER_KEYS
@ -391,9 +391,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_ARROW_RMINUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_ARROW_RMINUS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_ANG, M_BRACKET_IN_BRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_ANG, M_BRACKET_IN_BRC,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
DYN_REC_START1, DYN_REC_START2, DM_REC1, DM_REC2,
K80(L1K0), K80(L1K1), DYN_MACRO_PLAY1, K80(L1K0), K80(L1K1), DM_PLY1,
DYN_REC_STOP, KC_TRNS, DYN_MACRO_PLAY2, DM_RSTP, KC_TRNS, DM_PLY2,
/* right hand */ /* right hand */
M_BRACKET_OUT_CBR, KC_TRNS, KC_NUM, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, M_BRACKET_OUT_CBR, KC_TRNS, KC_NUM, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS,
M_BRACKET_OUT_PRN, M_ARROW_LEQL, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, M_BRACKET_OUT_PRN, M_ARROW_LEQL, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS,

View File

@ -121,9 +121,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `------------------------------------------------------------------------------------' * `------------------------------------------------------------------------------------'
*/ */
[_ADJUST] = LAYOUT_ortho_4x12( [_ADJUST] = LAYOUT_ortho_4x12(
M_CUSTOM, QK_BOOT, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , M_CUSTOM, QK_BOOT, QWERTY, BL_ON, BL_OFF, DM_REC1, DM_REC2, _______, _______, _______, _______, KC_DEL ,
KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, QWERTY , KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DM_PLY1, DM_PLY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, QWERTY ,
TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, COLEMAK , TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DM_RSTP, DM_RSTP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, COLEMAK ,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
), ),

View File

@ -129,7 +129,7 @@ void dynamic_macro_record_end(keyrecord_t *macro_buffer, keyrecord_t *macro_poin
dynamic_macro_led_blink(); dynamic_macro_led_blink();
/* Do not save the keys being held when stopping the recording, /* Do not save the keys being held when stopping the recording,
* i.e. the keys used to access the layer DYN_REC_STOP is on. * i.e. the keys used to access the layer DM_RSTP is on.
*/ */
while (macro_pointer != macro_buffer && (macro_pointer - direction)->event.pressed) { while (macro_pointer != macro_buffer && (macro_pointer - direction)->event.pressed) {
dprintln("dynamic macro: trimming a trailing key-down event"); dprintln("dynamic macro: trimming a trailing key-down event");
@ -202,18 +202,18 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record) {
/* No macro recording in progress. */ /* No macro recording in progress. */
if (!record->event.pressed) { if (!record->event.pressed) {
switch (keycode) { switch (keycode) {
case DYN_REC_START1: case QK_DYNAMIC_MACRO_RECORD_START_1:
dynamic_macro_record_start(&macro_pointer, macro_buffer); dynamic_macro_record_start(&macro_pointer, macro_buffer);
macro_id = 1; macro_id = 1;
return false; return false;
case DYN_REC_START2: case QK_DYNAMIC_MACRO_RECORD_START_2:
dynamic_macro_record_start(&macro_pointer, r_macro_buffer); dynamic_macro_record_start(&macro_pointer, r_macro_buffer);
macro_id = 2; macro_id = 2;
return false; return false;
case DYN_MACRO_PLAY1: case QK_DYNAMIC_MACRO_PLAY_1:
dynamic_macro_play(macro_buffer, macro_end, +1); dynamic_macro_play(macro_buffer, macro_end, +1);
return false; return false;
case DYN_MACRO_PLAY2: case QK_DYNAMIC_MACRO_PLAY_2:
dynamic_macro_play(r_macro_buffer, r_macro_end, -1); dynamic_macro_play(r_macro_buffer, r_macro_end, -1);
return false; return false;
} }
@ -221,7 +221,7 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record) {
} else { } else {
/* A macro is being recorded right now. */ /* A macro is being recorded right now. */
switch (keycode) { switch (keycode) {
case DYN_REC_STOP: case QK_DYNAMIC_MACRO_RECORD_STOP:
/* Stop the macro recording. */ /* Stop the macro recording. */
if (record->event.pressed) { /* Ignore the initial release if (record->event.pressed) { /* Ignore the initial release
* just after the recoding * just after the recoding
@ -237,8 +237,8 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record) {
macro_id = 0; macro_id = 0;
} }
return false; return false;
case DYN_MACRO_PLAY1: case QK_DYNAMIC_MACRO_PLAY_1:
case DYN_MACRO_PLAY2: case QK_DYNAMIC_MACRO_PLAY_2:
dprintln("dynamic macro: ignoring macro play key while recording"); dprintln("dynamic macro: ignoring macro play key while recording");
return false; return false;
default: default:

View File

@ -139,7 +139,7 @@ void dynamic_macro_record_end(keyrecord_t *macro_buffer, keyrecord_t *macro_poin
dynamic_macro_record_end_user(direction); dynamic_macro_record_end_user(direction);
/* Do not save the keys being held when stopping the recording, /* Do not save the keys being held when stopping the recording,
* i.e. the keys used to access the layer DYN_REC_STOP is on. * i.e. the keys used to access the layer DM_RSTP is on.
*/ */
while (macro_pointer != macro_buffer && (macro_pointer - direction)->event.pressed) { while (macro_pointer != macro_buffer && (macro_pointer - direction)->event.pressed) {
dprintln("dynamic macro: trimming a trailing key-down event"); dprintln("dynamic macro: trimming a trailing key-down event");
@ -212,18 +212,18 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) {
/* No macro recording in progress. */ /* No macro recording in progress. */
if (!record->event.pressed) { if (!record->event.pressed) {
switch (keycode) { switch (keycode) {
case DYN_REC_START1: case QK_DYNAMIC_MACRO_RECORD_START_1:
dynamic_macro_record_start(&macro_pointer, macro_buffer); dynamic_macro_record_start(&macro_pointer, macro_buffer);
macro_id = 1; macro_id = 1;
return false; return false;
case DYN_REC_START2: case QK_DYNAMIC_MACRO_RECORD_START_2:
dynamic_macro_record_start(&macro_pointer, r_macro_buffer); dynamic_macro_record_start(&macro_pointer, r_macro_buffer);
macro_id = 2; macro_id = 2;
return false; return false;
case DYN_MACRO_PLAY1: case QK_DYNAMIC_MACRO_PLAY_1:
dynamic_macro_play(macro_buffer, macro_end, +1); dynamic_macro_play(macro_buffer, macro_end, +1);
return false; return false;
case DYN_MACRO_PLAY2: case QK_DYNAMIC_MACRO_PLAY_2:
dynamic_macro_play(r_macro_buffer, r_macro_end, -1); dynamic_macro_play(r_macro_buffer, r_macro_end, -1);
return false; return false;
} }
@ -231,13 +231,13 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) {
} else { } else {
/* A macro is being recorded right now. */ /* A macro is being recorded right now. */
switch (keycode) { switch (keycode) {
case DYN_REC_START1: case QK_DYNAMIC_MACRO_RECORD_START_1:
case DYN_REC_START2: case QK_DYNAMIC_MACRO_RECORD_START_2:
case DYN_REC_STOP: case QK_DYNAMIC_MACRO_RECORD_STOP:
/* Stop the macro recording. */ /* Stop the macro recording. */
if (record->event.pressed ^ (keycode != DYN_REC_STOP)) { /* Ignore the initial release if (record->event.pressed ^ (keycode != QK_DYNAMIC_MACRO_RECORD_STOP)) { /* Ignore the initial release
* just after the recording * just after the recording
* starts for DYN_REC_STOP. */ * starts for DM_RSTP. */
switch (macro_id) { switch (macro_id) {
case 1: case 1:
dynamic_macro_record_end(macro_buffer, macro_pointer, +1, &macro_end); dynamic_macro_record_end(macro_buffer, macro_pointer, +1, &macro_end);
@ -250,8 +250,8 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
#ifdef DYNAMIC_MACRO_NO_NESTING #ifdef DYNAMIC_MACRO_NO_NESTING
case DYN_MACRO_PLAY1: case QK_DYNAMIC_MACRO_PLAY_1:
case DYN_MACRO_PLAY2: case QK_DYNAMIC_MACRO_PLAY_2:
dprintln("dynamic macro: ignoring macro play key while recording"); dprintln("dynamic macro: ignoring macro play key while recording");
return false; return false;
#endif #endif

View File

@ -424,11 +424,11 @@ enum quantum_keycodes {
MAGIC_EE_HANDS_RIGHT, // 5D03 MAGIC_EE_HANDS_RIGHT, // 5D03
// Dynamic Macros // Dynamic Macros
DYN_REC_START1, // 5D04 QK_DYNAMIC_MACRO_RECORD_START_1, // 5D04
DYN_REC_START2, // 5D05 QK_DYNAMIC_MACRO_RECORD_START_2, // 5D05
DYN_REC_STOP, // 5D06 QK_DYNAMIC_MACRO_RECORD_STOP, // 5D06
DYN_MACRO_PLAY1, // 5D07 QK_DYNAMIC_MACRO_PLAY_1, // 5D07
DYN_MACRO_PLAY2, // 5D08 QK_DYNAMIC_MACRO_PLAY_2, // 5D08
// Joystick // Joystick
QK_JOYSTICK_BUTTON_0, // 5D09 QK_JOYSTICK_BUTTON_0, // 5D09
@ -906,11 +906,11 @@ enum quantum_keycodes {
#define MIDI_CHANNEL_MAX MI_CH16 #define MIDI_CHANNEL_MAX MI_CH16
// Dynamic Macros aliases // Dynamic Macros aliases
#define DM_REC1 DYN_REC_START1 #define DM_REC1 QK_DYNAMIC_MACRO_RECORD_START_1
#define DM_REC2 DYN_REC_START2 #define DM_REC2 QK_DYNAMIC_MACRO_RECORD_START_2
#define DM_RSTP DYN_REC_STOP #define DM_RSTP QK_DYNAMIC_MACRO_RECORD_STOP
#define DM_PLY1 DYN_MACRO_PLAY1 #define DM_PLY1 QK_DYNAMIC_MACRO_PLAY_1
#define DM_PLY2 DYN_MACRO_PLAY2 #define DM_PLY2 QK_DYNAMIC_MACRO_PLAY_2
// Joystick aliases // Joystick aliases
#define JS_0 QK_JOYSTICK_BUTTON_0 #define JS_0 QK_JOYSTICK_BUTTON_0

View File

@ -38,6 +38,12 @@
#define UC_M_WC QK_UNICODE_MODE_WINCOMPOSE #define UC_M_WC QK_UNICODE_MODE_WINCOMPOSE
#define UC_M_EM QK_UNICODE_MODE_EMACS #define UC_M_EM QK_UNICODE_MODE_EMACS
#define DYN_REC_START1 QK_DYNAMIC_MACRO_RECORD_START_1
#define DYN_REC_START2 QK_DYNAMIC_MACRO_RECORD_START_2
#define DYN_REC_STOP QK_DYNAMIC_MACRO_RECORD_STOP
#define DYN_MACRO_PLAY1 QK_DYNAMIC_MACRO_PLAY_1
#define DYN_MACRO_PLAY2 QK_DYNAMIC_MACRO_PLAY_2
#define PROGRAMMABLE_BUTTON_1 QK_PROGRAMMABLE_BUTTON_1 #define PROGRAMMABLE_BUTTON_1 QK_PROGRAMMABLE_BUTTON_1
#define PROGRAMMABLE_BUTTON_2 QK_PROGRAMMABLE_BUTTON_2 #define PROGRAMMABLE_BUTTON_2 QK_PROGRAMMABLE_BUTTON_2
#define PROGRAMMABLE_BUTTON_3 QK_PROGRAMMABLE_BUTTON_3 #define PROGRAMMABLE_BUTTON_3 QK_PROGRAMMABLE_BUTTON_3

View File

@ -7,17 +7,17 @@ void macroTogKey(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) if (state->count == 1)
{ {
kr.event.pressed = false; kr.event.pressed = false;
process_record_dynamic_macro( DYN_MACRO_PLAY1, &kr ); process_record_dynamic_macro( DM_PLY1, &kr );
} }
else if (state->count == 2) else if (state->count == 2)
{ {
kr.event.pressed = true; kr.event.pressed = true;
process_record_dynamic_macro( DYN_REC_STOP, &kr ); process_record_dynamic_macro( DM_RSTP, &kr );
} }
else if (state->count == 3) else if (state->count == 3)
{ {
kr.event.pressed = false; kr.event.pressed = false;
process_record_dynamic_macro( DYN_REC_START1, &kr ); process_record_dynamic_macro( QK_DYNAMIC_MACRO_RECORD_START_1, &kr );
} }
} }
@ -27,17 +27,17 @@ void macroTogKey2(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) if (state->count == 1)
{ {
kr.event.pressed = false; kr.event.pressed = false;
process_record_dynamic_macro( DYN_MACRO_PLAY2, &kr ); process_record_dynamic_macro( DM_PLY2, &kr );
} }
else if (state->count == 2) else if (state->count == 2)
{ {
kr.event.pressed = true; kr.event.pressed = true;
process_record_dynamic_macro( DYN_REC_STOP, &kr ); process_record_dynamic_macro( DM_RSTP, &kr );
} }
else if (state->count == 3) else if (state->count == 3)
{ {
kr.event.pressed = false; kr.event.pressed = false;
process_record_dynamic_macro( DYN_REC_START2, &kr ); process_record_dynamic_macro( DM_REC2, &kr );
} }
} }
*/ */