mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-07-29 20:54:18 -04:00
Added a thing for flow tap, which is actually very helpful
This commit is contained in:
parent
e8a30d29fb
commit
696088f553
6 changed files with 25 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "./taphold_options.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include "../alias.h"
|
||||
#include "../tap_dance/tap_dance.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -51,3 +51,9 @@ bool unshift_register_or_ctrl_fallthrough(
|
|||
/// @param record The current `keyrecord_t`.
|
||||
/// @return Whether processing of the key should continue.
|
||||
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);
|
||||
Loading…
Reference in a new issue