mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-24 18:25:01 +06:00
Make modifiers 'weak' in macro
This commit is contained in:
parent
a86c1e2b71
commit
cb3a547ebf
@ -16,6 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
|
#include "action_util.h"
|
||||||
#include "action_macro.h"
|
#include "action_macro.h"
|
||||||
|
|
||||||
#ifdef DEBUG_ACTION
|
#ifdef DEBUG_ACTION
|
||||||
@ -39,12 +40,20 @@ void action_macro_play(const macro_t *macro_p)
|
|||||||
case KEY_DOWN:
|
case KEY_DOWN:
|
||||||
MACRO_READ();
|
MACRO_READ();
|
||||||
dprintf("KEY_DOWN(%02X)\n", macro);
|
dprintf("KEY_DOWN(%02X)\n", macro);
|
||||||
register_code(macro);
|
if (IS_MOD(macro)) {
|
||||||
|
add_weak_mods(MOD_BIT(macro));
|
||||||
|
} else {
|
||||||
|
register_code(macro);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case KEY_UP:
|
case KEY_UP:
|
||||||
MACRO_READ();
|
MACRO_READ();
|
||||||
dprintf("KEY_UP(%02X)\n", macro);
|
dprintf("KEY_UP(%02X)\n", macro);
|
||||||
unregister_code(macro);
|
if (IS_MOD(macro)) {
|
||||||
|
del_weak_mods(MOD_BIT(macro));
|
||||||
|
} else {
|
||||||
|
unregister_code(macro);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case WAIT:
|
case WAIT:
|
||||||
MACRO_READ();
|
MACRO_READ();
|
||||||
|
Loading…
Reference in New Issue
Block a user