Add support for storing, restoring and clearing modifiers in macros
This commit is contained in:
parent
6baca549b9
commit
5a196b6444
2 changed files with 25 additions and 0 deletions
|
|
@ -34,6 +34,8 @@ void action_macro_play(const macro_t *macro_p)
|
|||
macro_t macro = END;
|
||||
uint8_t interval = 0;
|
||||
|
||||
uint8_t mod_storage;
|
||||
|
||||
if (!macro_p) return;
|
||||
while (true) {
|
||||
switch (MACRO_READ()) {
|
||||
|
|
@ -66,6 +68,17 @@ void action_macro_play(const macro_t *macro_p)
|
|||
interval = MACRO_READ();
|
||||
dprintf("INTERVAL(%u)\n", interval);
|
||||
break;
|
||||
case MOD_STORE:
|
||||
mod_storage = get_mods();
|
||||
break;
|
||||
case MOD_RESTORE:
|
||||
set_mods(mod_storage);
|
||||
send_keyboard_report();
|
||||
break;
|
||||
case MOD_CLEAR:
|
||||
clear_mods();
|
||||
send_keyboard_report();
|
||||
break;
|
||||
case 0x04 ... 0x73:
|
||||
dprintf("DOWN(%02X)\n", macro);
|
||||
register_code(macro);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue