Browse Source

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>
pull/10397/head
Croktopus 3 years ago
committed by GitHub
parent
commit
e4a4ed3b0c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 17 additions and 72 deletions
  1. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c
  2. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c
  3. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c
  4. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c
  5. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/default/keymap.c
  6. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c
  7. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c
  8. +1
    -9
      keyboards/metamechs/timberwolf/keymaps/via/keymap.c
  9. +9
    -0
      keyboards/metamechs/timberwolf/timberwolf.c

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c View File

@ -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);
}
}
};

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c View File

@ -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);
}
}
};

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c View File

@ -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);
}
}
};

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c View File

@ -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);
}
}
};

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/default/keymap.c View File

@ -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);
}
}
};

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c View File

@ -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);
}
}
};

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c View File

@ -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);
}
}
};

+ 1
- 9
keyboards/metamechs/timberwolf/keymaps/via/keymap.c View File

@ -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);
}
}
};

+ 9
- 0
keyboards/metamechs/timberwolf/timberwolf.c View File

@ -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…
Cancel
Save