Tuning and bug fixes

- Fixed bug that releasing double tap and bracket holds put another set of
brackets or double taps
- Added delay for NUM_0 Layer Tap
This commit is contained in:
Victor 2024-05-09 22:57:42 -05:00
parent f57e5fedf7
commit 7c923a5c4a
Failed to generate hash of commit
2 changed files with 10 additions and 4 deletions

View file

@ -52,21 +52,21 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t tap_keycode, uint16_t ho
// https://getreuer.info/posts/keyboards/triggers/index.html#tap-vs.-long-press
if ( record->tap.count > 0 ) { // Key is being tapped
if (record->tap.count > 0) { // Key is being tapped
// register on press, unregister on release
record->event.pressed ? register_code16(tap_keycode) : unregister_code16(tap_keycode);
} else { // Key is being held
switch ( mode ) {
switch (mode) {
case HOLD_BRACKETS:
insert_brackets(tap_keycode, hold_keycode, WAIT_DELAY);
record->event.pressed ? insert_brackets(tap_keycode, hold_keycode, WAIT_DELAY) : 0;
break;
case HOLD_DOUBLETP:
double_tap(tap_keycode, WAIT_DELAY);
record->event.pressed ? double_tap(tap_keycode, WAIT_DELAY) : 0;
break;
default:

View file

@ -1,10 +1,16 @@
#include "tapping.h"
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case NAV_0:
return TAPPING_TERM + 60;
default:
//uprintf("tapping term: %d \n", TAPPING_TERM);
return TAPPING_TERM;
}
}