From 696088f5535f6d95a8368084721744587856c1b3 Mon Sep 17 00:00:00 2001 From: Drew Whitney Date: Sun, 2 Nov 2025 23:26:49 -0700 Subject: [PATCH] Added a thing for flow tap, which is actually very helpful --- .../keebio/nyquist/rev4/keymaps/drew/config.h | 1 + .../rev4/keymaps/drew/flow_tap/flow_tap_options.c | 14 ++++++++++++++ .../keebio/nyquist/rev4/keymaps/drew/rules.mk | 1 + .../rev4/keymaps/drew/taphold/taphold_options.c | 3 ++- .../rev4/keymaps/drew/taphold/taphold_options.h | 9 --------- .../keebio/nyquist/rev4/keymaps/drew/utils/utils.h | 8 +++++++- 6 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 keyboards/keebio/nyquist/rev4/keymaps/drew/flow_tap/flow_tap_options.c delete mode 100644 keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.h diff --git a/keyboards/keebio/nyquist/rev4/keymaps/drew/config.h b/keyboards/keebio/nyquist/rev4/keymaps/drew/config.h index 56317a17..e4b2f8c6 100644 --- a/keyboards/keebio/nyquist/rev4/keymaps/drew/config.h +++ b/keyboards/keebio/nyquist/rev4/keymaps/drew/config.h @@ -32,6 +32,7 @@ #define HOLD_ON_OTHER_KEY_PRESS_PER_KEY #define PERMISSIVE_HOLD_PER_KEY #define TAPPING_TERM_PER_KEY +#define FLOW_TAP_TERM 150 // #define CHORDAL_HOLD #define CAPS_WORD_IDLE_TIMEOUT 0 diff --git a/keyboards/keebio/nyquist/rev4/keymaps/drew/flow_tap/flow_tap_options.c b/keyboards/keebio/nyquist/rev4/keymaps/drew/flow_tap/flow_tap_options.c new file mode 100644 index 00000000..4af34293 --- /dev/null +++ b/keyboards/keebio/nyquist/rev4/keymaps/drew/flow_tap/flow_tap_options.c @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +bool is_flow_tap_key(uint16_t keycode) { + switch (get_tap_keycode(keycode)) { + case KC_A ... KC_Z: + case KC_DOT: + case KC_COMM: + case KC_SCLN: + case KC_SLSH: + case KC_QUOT: + return true; + } + return false; +} diff --git a/keyboards/keebio/nyquist/rev4/keymaps/drew/rules.mk b/keyboards/keebio/nyquist/rev4/keymaps/drew/rules.mk index daac9e9b..fdd8a18e 100644 --- a/keyboards/keebio/nyquist/rev4/keymaps/drew/rules.mk +++ b/keyboards/keebio/nyquist/rev4/keymaps/drew/rules.mk @@ -2,6 +2,7 @@ SRC += caps_word/caps_word.c SRC += taphold/taphold_options.c SRC += utils/utils.c # SRC += chordal_hold/chordal_options.c +SRC += flow_tap/flow_tap_options.c # VIA_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.c b/keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.c index 20498de3..67191468 100644 --- a/keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.c +++ b/keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.c @@ -1,4 +1,5 @@ -#include "./taphold_options.h" +#include QMK_KEYBOARD_H + #include "../alias.h" #include "../tap_dance/tap_dance.h" diff --git a/keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.h b/keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.h deleted file mode 100644 index 233ac588..00000000 --- a/keyboards/keebio/nyquist/rev4/keymaps/drew/taphold/taphold_options.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include QMK_KEYBOARD_H -#include "stdint.h" - -uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t* record); -bool get_permissive_hold(uint16_t keycode, keyrecord_t* record); -bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t* record); -uint16_t get_tapping_term(uint16_t keycode, keyrecord_t* record); \ No newline at end of file diff --git a/keyboards/keebio/nyquist/rev4/keymaps/drew/utils/utils.h b/keyboards/keebio/nyquist/rev4/keymaps/drew/utils/utils.h index 3578746a..2db67b6b 100644 --- a/keyboards/keebio/nyquist/rev4/keymaps/drew/utils/utils.h +++ b/keyboards/keebio/nyquist/rev4/keymaps/drew/utils/utils.h @@ -50,4 +50,10 @@ bool unshift_register_or_ctrl_fallthrough( /// @param keycode The keycode being processed. /// @param record The current `keyrecord_t`. /// @return Whether processing of the key should continue. -bool unshift_register(uint8_t keycode, keyrecord_t* record); \ No newline at end of file +bool unshift_register(uint8_t keycode, keyrecord_t* record); + +/// @brief Trigger a key's tap action when it is held and not interrupted. +/// @param keycode The keycode being processed. +/// @param record The current `keyrecord_t`. +/// @return Whether processing of the key should continue. +bool trigger_tap_on_hold(uint8_t keycode, keyrecord_t* record); \ No newline at end of file