diff options
author | Stephan Bösebeck <sb@caluga.de> | 2016-03-28 22:29:18 +0200 |
---|---|---|
committer | Stephan Bösebeck <sb@caluga.de> | 2016-03-28 22:29:18 +0200 |
commit | 37e68596ddefcaa9ac0289a8e17672804e475327 (patch) | |
tree | a7d9016e1dbbdd11cefa6a963d86e00595b2c71a /tmk_core/common/action.c | |
parent | 94e96456b87c28299b426e8d0f047033f6d93d42 (diff) | |
parent | 4a43c5684476611370820bd9592712754c211c52 (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r-- | tmk_core/common/action.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 77ea39e942..2ccc0e0b94 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -53,6 +53,9 @@ void action_exec(keyevent_t event) #endif } +__attribute__ ((weak)) +void process_action_kb(keyrecord_t *record) {} + void process_action(keyrecord_t *record) { keyevent_t event = record->event; @@ -62,6 +65,8 @@ void process_action(keyrecord_t *record) if (IS_NOEVENT(event)) { return; } + process_action_kb(record); + action_t action = layer_switch_get_action(event.key); dprint("ACTION: "); debug_action(action); #ifndef NO_ACTION_LAYER @@ -70,6 +75,10 @@ void process_action(keyrecord_t *record) #endif dprintln(); + if (event.pressed) { + // clear the potential weak mods left by previously pressed keys + clear_weak_mods(); + } switch (action.kind.id) { /* Key and Mods */ case ACT_LMODS: @@ -500,6 +509,7 @@ void clear_keyboard(void) void clear_keyboard_but_mods(void) { clear_weak_mods(); + clear_macro_mods(); clear_keys(); send_keyboard_report(); #ifdef MOUSEKEY_ENABLE |