forked from mfulz_github/qmk_firmware
		
	Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
		
						commit
						e4ff5eb3eb
					
				@ -1,5 +1,11 @@
 | 
				
			|||||||
#include QMK_KEYBOARD_H
 | 
					#include QMK_KEYBOARD_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enum encoder_names {
 | 
				
			||||||
 | 
					  _LEFT,
 | 
				
			||||||
 | 
					  _RIGHT,
 | 
				
			||||||
 | 
					  _MIDDLE,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum layer_names {
 | 
					enum layer_names {
 | 
				
			||||||
  _ZERO,
 | 
					  _ZERO,
 | 
				
			||||||
  _ONE,
 | 
					  _ONE,
 | 
				
			||||||
@ -36,17 +42,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void encoder_update_user(uint8_t index, bool clockwise) {
 | 
					void encoder_update_user(uint8_t index, bool clockwise) {
 | 
				
			||||||
    if (index == 0) {
 | 
					    if (index == _LEFT) {
 | 
				
			||||||
        if (clockwise) {
 | 
					        if (clockwise) {
 | 
				
			||||||
            tap_code(KC_VOLU);
 | 
					            tap_code(KC_VOLU);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            tap_code(KC_VOLD);
 | 
					            tap_code(KC_VOLD);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    } else if (index == 1) {
 | 
					    }
 | 
				
			||||||
 | 
					    else if (index == _MIDDLE) {
 | 
				
			||||||
        if (clockwise) {
 | 
					        if (clockwise) {
 | 
				
			||||||
            tap_code(KC_WH_U);
 | 
					            tap_code(KC_DOWN);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            tap_code(KC_WH_D);
 | 
					            tap_code(KC_UP);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else if (index == _RIGHT) {
 | 
				
			||||||
 | 
					        if (clockwise) {
 | 
				
			||||||
 | 
					            tap_code(KC_PGDN);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            tap_code(KC_PGUP);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user