mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-07-29 20:54:18 -04:00
Fixed flow-tap to not block control
This commit is contained in:
parent
01c4d37339
commit
158adf2f04
1 changed files with 24 additions and 5 deletions
|
|
@ -1,14 +1,33 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include "../alias.h"
|
||||
|
||||
bool is_flow_tap_key(uint16_t keycode) {
|
||||
switch (get_tap_keycode(keycode)) {
|
||||
uint16_t get_flow_tap_term(uint16_t keycode, keyrecord_t* record, uint16_t previous_keycode) {
|
||||
switch (get_tap_keycode(previous_keycode)) {
|
||||
case KC_A ... KC_Z:
|
||||
case KC_DOT:
|
||||
case KC_COMM:
|
||||
case KC_SCLN:
|
||||
case KC_SLSH:
|
||||
case KC_QUOT:
|
||||
return true;
|
||||
case KC_QUOT: // enable flow-tap for these keys
|
||||
break;
|
||||
|
||||
default: // disable otherwise
|
||||
return 0;
|
||||
}
|
||||
return false;
|
||||
|
||||
switch (keycode) {
|
||||
case CTL_D:
|
||||
case CTL_K:
|
||||
case CTL_3:
|
||||
case CTL_8:
|
||||
case CTL_RBRC:
|
||||
case CTL_DOWN: // control should always be allowed to hold
|
||||
|
||||
case NUM_SPC:
|
||||
case NAV_ENT:
|
||||
case FUNC_PLAY: // same with layers
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
return FLOW_TAP_TERM; // enable flow-tap
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue