More ironing out of bugs
- Fixed the back stroke and forward stroke so it's tap hold override - Added ability to hold repeat the tap hold shifted key
This commit is contained in:
		
							parent
							
								
									7a4e3d8b5c
								
							
						
					
					
						commit
						f57e5fedf7
					
				
					 2 changed files with 21 additions and 28 deletions
				
			
		| 
						 | 
				
			
			@ -51,36 +51,29 @@ 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->event.pressed) {
 | 
			
		||||
      // Handle tap press event...
 | 
			
		||||
      register_code16(tap_keycode);
 | 
			
		||||
    
 | 
			
		||||
    } else {
 | 
			
		||||
      // Handle tap release event...
 | 
			
		||||
      unregister_code16(tap_keycode);
 | 
			
		||||
  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 ) {
 | 
			
		||||
 | 
			
		||||
      case HOLD_BRACKETS:
 | 
			
		||||
        insert_brackets(tap_keycode, hold_keycode, WAIT_DELAY);
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case HOLD_DOUBLETP:
 | 
			
		||||
        double_tap(tap_keycode, WAIT_DELAY);
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      default:
 | 
			
		||||
        record->event.pressed ? register_code16(hold_keycode) : unregister_code16(hold_keycode);
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  } else {
 | 
			
		||||
    // Key is being held
 | 
			
		||||
 | 
			
		||||
    if (record->event.pressed) {
 | 
			
		||||
      // Handle tap press event...
 | 
			
		||||
      switch ( mode ) {
 | 
			
		||||
        case HOLD_BRACKETS:
 | 
			
		||||
          insert_brackets(tap_keycode, hold_keycode, WAIT_DELAY);
 | 
			
		||||
          break;
 | 
			
		||||
        case HOLD_DOUBLETP:
 | 
			
		||||
          double_tap(tap_keycode, WAIT_DELAY);
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          single_tap(tap_keycode);
 | 
			
		||||
          break;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -240,7 +240,7 @@ enum keycodes {
 | 
			
		|||
#define LAYER_SYMBOL                                                                        \
 | 
			
		||||
  ___x___, ___x___, KC_AMPR, TR_PERC, TR_GRV,  TR_EQL,  KC_HASH, KC_ASTR, ___x___, TR_DQUO, \
 | 
			
		||||
  KC_CAPS, TR_LCBR, KC_RCBR, KC_EXLM, TR_SCLN, KC_AT,   KC_QUES, TR_LBRC, KC_RBRC, TR_SQUO, \
 | 
			
		||||
  ___x___, TR_LABK, KC_RABK, KC_BSLS, TR_PIPE, KC_DLR,  KC_SLSH, TR_LPRN, KC_RPRN, TR_MINS, \
 | 
			
		||||
  ___x___, TR_LABK, KC_RABK, TR_BSLS, TR_PIPE, KC_DLR,  TR_SLSH, TR_LPRN, KC_RPRN, TR_MINS, \
 | 
			
		||||
                    _LAYER_TRANS_____________, _LAYER_TRANS_____________
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue