diff options
author | Joel Challis <git@zvecr.com> | 2021-11-01 19:18:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 19:18:33 +0000 |
commit | 92385e30cdad61ddfc0461b1ce1340bcb494a68a (patch) | |
tree | d472f93ed9f4e42e4972630d8178a387b91a51bc /quantum/action_tapping.c | |
parent | ee371c1295f00c119dd5a1bb2f3d4acedff832a7 (diff) |
Manually format develop (#15003)
Diffstat (limited to 'quantum/action_tapping.c')
-rw-r--r-- | quantum/action_tapping.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 36839f9faf..60e56fb811 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -18,11 +18,11 @@ # define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) # define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) # define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) -#ifndef COMBO_ENABLE -# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key))) -#else -# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode) -#endif +# ifndef COMBO_ENABLE +# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key))) +# else +# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode) +# endif __attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; } @@ -212,11 +212,15 @@ bool process_tapping(keyrecord_t *keyp) { if (tapping_key.tap.count > 1) { debug("Tapping: Start new tap with releasing last tap(>1).\n"); // unregister key - process_record(&(keyrecord_t){.tap = tapping_key.tap, .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false, -#ifdef COMBO_ENABLE - .keycode = tapping_key.keycode, -#endif - }); + process_record(&(keyrecord_t){ + .tap = tapping_key.tap, + .event.key = tapping_key.event.key, + .event.time = event.time, + .event.pressed = false, +# ifdef COMBO_ENABLE + .keycode = tapping_key.keycode, +# endif + }); } else { debug("Tapping: Start while last tap(1).\n"); } @@ -254,11 +258,15 @@ bool process_tapping(keyrecord_t *keyp) { if (tapping_key.tap.count > 1) { debug("Tapping: Start new tap with releasing last timeout tap(>1).\n"); // unregister key - process_record(&(keyrecord_t){.tap = tapping_key.tap, .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false, -#ifdef COMBO_ENABLE - .keycode = tapping_key.keycode, -#endif - }); + process_record(&(keyrecord_t){ + .tap = tapping_key.tap, + .event.key = tapping_key.event.key, + .event.time = event.time, + .event.pressed = false, +# ifdef COMBO_ENABLE + .keycode = tapping_key.keycode, +# endif + }); } else { debug("Tapping: Start while last timeout tap(1).\n"); } |