summaryrefslogtreecommitdiffstats
path: root/keyboards/maartenwut/ta65/keymaps
diff options
context:
space:
mode:
authorMaarten Dekkers <maartenwut@gmail.com>2020-04-24 19:41:05 +0200
committerGitHub <noreply@github.com>2020-04-24 19:41:05 +0200
commit5c9c45619e267e1c43fee483a1a1de54c12989bc (patch)
tree9d41bf3f306fdf3ec128c329d35e7045c3039367 /keyboards/maartenwut/ta65/keymaps
parent1df8bb3cdbfdee86af579a532c6cfaa5c89fc154 (diff)
Change keymap encoder code
Co-Authored-By: Joel Challis <git@zvecr.com>
Diffstat (limited to 'keyboards/maartenwut/ta65/keymaps')
-rw-r--r--keyboards/maartenwut/ta65/keymaps/default/keymap.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/keyboards/maartenwut/ta65/keymaps/default/keymap.c b/keyboards/maartenwut/ta65/keymaps/default/keymap.c
index 00cd65abb4..8bb8a14ba0 100644
--- a/keyboards/maartenwut/ta65/keymaps/default/keymap.c
+++ b/keyboards/maartenwut/ta65/keymaps/default/keymap.c
@@ -19,29 +19,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) { /* First encoder */
- switch(get_highest_layer(layer_state)){
- case 0: //Layer 0
- if (!clockwise) { // Remove ! to reverse direction
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- case 1: //Layer 1
- if (!clockwise) {
- tap_code(KC_WH_U);
- } else {
- tap_code(KC_WH_D);
- }
- break;
- default:
- if (!clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
+ switch(get_highest_layer(layer_state)){
+ case 1: //Layer 1
+ if (!clockwise) { // Remove ! to reverse direction
+ tap_code(KC_WH_U);
+ } else {
+ tap_code(KC_WH_D);
+ }
+ break;
+ default: //Layer 0
+ if (!clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ break;
}
}