mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
moved encoder code to timberwolf.c (#10317)
* moved encoder code to timberwolf.c * Update keyboards/metamechs/timberwolf/timberwolf.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
7ddae97c89
commit
e4a4ed3b0c
@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
|
||||
MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
|
||||
MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,
|
||||
MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
|
||||
MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,
|
||||
MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
|
||||
MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -49,12 +49,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
_______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
};
|
@ -27,3 +27,12 @@ bool led_update_kb(led_t led_state) {
|
||||
}
|
||||
return runDefault;
|
||||
}
|
||||
|
||||
__attribute__((weak))
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user