Add dynamic macro keyboard callbacks (#24142)
This commit is contained in:
parent
faf51c7449
commit
ab4c13e835
7 changed files with 88 additions and 296 deletions
|
|
@ -21,18 +21,26 @@ static uint32_t dynamic_macro_led(uint32_t trigger_time, void *cb_arg) {
|
|||
return 100;
|
||||
}
|
||||
|
||||
void dynamic_macro_record_start_user(int8_t direction) {
|
||||
bool dynamic_macro_record_start_kb(int8_t direction) {
|
||||
if (!dynamic_macro_record_start_user(direction)) {
|
||||
return false;
|
||||
}
|
||||
if (dynamic_macro_token == INVALID_DEFERRED_TOKEN) {
|
||||
STATUS_LED_3(true);
|
||||
dynamic_macro_token = defer_exec(100, dynamic_macro_led, NULL);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dynamic_macro_record_end_user(int8_t direction) {
|
||||
bool dynamic_macro_record_end_kb(int8_t direction) {
|
||||
if (!dynamic_macro_record_end_user(direction)) {
|
||||
return false;
|
||||
}
|
||||
if (cancel_deferred_exec(dynamic_macro_token)) {
|
||||
dynamic_macro_token = INVALID_DEFERRED_TOKEN;
|
||||
STATUS_LED_3(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue