mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-20 14:25:28 -04:00
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:
parent
f57e5fedf7
commit
7c923a5c4a
2 changed files with 10 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue