diff options
Diffstat (limited to 'common/action_macro.c')
| -rw-r--r-- | common/action_macro.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/common/action_macro.c b/common/action_macro.c index cc7ac18a0..d85aee379 100644 --- a/common/action_macro.c +++ b/common/action_macro.c | |||
| @@ -16,6 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 16 | */ | 16 | */ |
| 17 | #include <util/delay.h> | 17 | #include <util/delay.h> |
| 18 | #include "action.h" | 18 | #include "action.h" |
| 19 | #include "action_util.h" | ||
| 19 | #include "action_macro.h" | 20 | #include "action_macro.h" |
| 20 | 21 | ||
| 21 | #ifdef DEBUG_ACTION | 22 | #ifdef DEBUG_ACTION |
| @@ -39,12 +40,20 @@ void action_macro_play(const macro_t *macro_p) | |||
| 39 | case KEY_DOWN: | 40 | case KEY_DOWN: |
| 40 | MACRO_READ(); | 41 | MACRO_READ(); |
| 41 | dprintf("KEY_DOWN(%02X)\n", macro); | 42 | dprintf("KEY_DOWN(%02X)\n", macro); |
| 42 | register_code(macro); | 43 | if (IS_MOD(macro)) { |
| 44 | add_weak_mods(MOD_BIT(macro)); | ||
| 45 | } else { | ||
| 46 | register_code(macro); | ||
| 47 | } | ||
| 43 | break; | 48 | break; |
| 44 | case KEY_UP: | 49 | case KEY_UP: |
| 45 | MACRO_READ(); | 50 | MACRO_READ(); |
| 46 | dprintf("KEY_UP(%02X)\n", macro); | 51 | dprintf("KEY_UP(%02X)\n", macro); |
| 47 | unregister_code(macro); | 52 | if (IS_MOD(macro)) { |
| 53 | del_weak_mods(MOD_BIT(macro)); | ||
| 54 | } else { | ||
| 55 | unregister_code(macro); | ||
| 56 | } | ||
| 48 | break; | 57 | break; |
| 49 | case WAIT: | 58 | case WAIT: |
| 50 | MACRO_READ(); | 59 | MACRO_READ(); |
