diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-07-31 23:29:32 -0400 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-07-31 23:29:32 -0400 |
commit | 8a07938d9b03567ba11fc3e86a4fefb0ac098646 (patch) | |
tree | 62c9ef9b1411806c7baddb73bd83fefd8105cccf /app | |
parent | 8bba1fb7384c473bc6aa8ba700f3ee5eabadee4e (diff) |
Minor cleanup.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/behaviors/behavior_mod_tap.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/app/src/behaviors/behavior_mod_tap.c b/app/src/behaviors/behavior_mod_tap.c index b7d4f4e..6151f7e 100644 --- a/app/src/behaviors/behavior_mod_tap.c +++ b/app/src/behaviors/behavior_mod_tap.c @@ -22,17 +22,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define ZMK_BHV_MOD_TAP_MAX_HELD 4 #define ZMK_BHV_MOD_TAP_MAX_PENDING_KC 4 -#define TOGGLE_FIRST(arr, len, match, val) \ - for (int idx = 0; idx < len; idx++) \ - { \ - if (arr[idx] != match) \ - { \ - continue; \ - } \ - arr[idx] = val; \ - break; \ - } - struct active_mod_tap_item { u32_t keycode; u8_t mods; @@ -128,10 +117,8 @@ int behavior_mod_tap_listener(const struct zmk_event_header *eh) behavior_mod_tap_capture_keycode_event(data, ev); return ZMK_EV_EVENT_CAPTURED; } else if ((pending_keycode = find_pending_keycode(data, ev->keycode)) != NULL) { - LOG_DBG("Key released, going to activate mods then send pending key presses"); - - - LOG_DBG("Setting mods: %d", pending_keycode->active_mods); + LOG_DBG("Key released, going to activate mods 0x%02X then send pending key press for keycode 0x%02X", + pending_keycode->active_mods, pending_keycode->event->keycode); zmk_hid_register_mods(pending_keycode->active_mods); behavior_mod_tap_update_active_mods_state(data, pending_keycode->active_mods); |