Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2022-10-03 07:27:22 +00:00
commit 37542bff09

View File

@ -45,6 +45,10 @@ __attribute__((weak)) void dynamic_macro_record_end_user(int8_t direction) {
dynamic_macro_led_blink(); dynamic_macro_led_blink();
} }
__attribute__((weak)) bool dynamic_macro_valid_key_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
/* Convenience macros used for retrieving the debug info. All of them /* Convenience macros used for retrieving the debug info. All of them
* need a `direction` variable accessible at the call site. * need a `direction` variable accessible at the call site.
*/ */
@ -252,14 +256,16 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) {
return false; return false;
#endif #endif
default: default:
/* Store the key in the macro buffer and process it normally. */ if (dynamic_macro_valid_key_user(keycode, record)) {
switch (macro_id) { /* Store the key in the macro buffer and process it normally. */
case 1: switch (macro_id) {
dynamic_macro_record_key(macro_buffer, &macro_pointer, r_macro_end, +1, record); case 1:
break; dynamic_macro_record_key(macro_buffer, &macro_pointer, r_macro_end, +1, record);
case 2: break;
dynamic_macro_record_key(r_macro_buffer, &macro_pointer, macro_end, -1, record); case 2:
break; dynamic_macro_record_key(r_macro_buffer, &macro_pointer, macro_end, -1, record);
break;
}
} }
return true; return true;
break; break;