Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
		
							parent
							
								
									d10350cd2c
								
							
						
					
					
						commit
						bbf7a20b33
					
				
					 77 changed files with 2457 additions and 1968 deletions
				
			
		| 
						 | 
				
			
			@ -130,18 +130,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
    return true;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
LEADER_EXTERNS();
 | 
			
		||||
 | 
			
		||||
void matrix_scan_user(void) {
 | 
			
		||||
    LEADER_DICTIONARY() {
 | 
			
		||||
        leading = false;
 | 
			
		||||
        leader_end();
 | 
			
		||||
 | 
			
		||||
        SEQ_TWO_KEYS(KC_G, KC_P) {
 | 
			
		||||
            SEND_STRING("git push");
 | 
			
		||||
        }
 | 
			
		||||
        SEQ_THREE_KEYS(KC_G, KC_F, KC_P) {
 | 
			
		||||
            SEND_STRING("git push --force-with-lease");
 | 
			
		||||
        }
 | 
			
		||||
void leader_end_user(void) {
 | 
			
		||||
    if (leader_sequence_two_keys(KC_G, KC_P)) {
 | 
			
		||||
        SEND_STRING("git push");
 | 
			
		||||
    }
 | 
			
		||||
    if (leader_sequence_three_keys(KC_G, KC_F, KC_P)) {
 | 
			
		||||
        SEND_STRING("git push --force-with-lease");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue