diff options
| author | Croktopus <39040552+Croktopus@users.noreply.github.com> | 2020-09-21 22:54:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-21 22:54:55 -0700 |
| commit | e4a4ed3b0c053ebed902a28b2a8f68cdf78597f5 (patch) | |
| tree | d014853c1f97afbf5856a8af66a5e2cc22d34a18 /keyboards/metamechs/timberwolf | |
| parent | 7ddae97c89905f8826c2efe0331d681d6a75876a (diff) | |
| download | qmk_firmware-e4a4ed3b0c053ebed902a28b2a8f68cdf78597f5.tar.gz qmk_firmware-e4a4ed3b0c053ebed902a28b2a8f68cdf78597f5.zip | |
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>
Diffstat (limited to 'keyboards/metamechs/timberwolf')
9 files changed, 17 insertions, 72 deletions
diff --git a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c index 0e4f99442..7d66af49b 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c | |||
| @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, | 33 | _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, |
| 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ | 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; \ No newline at end of file |
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_VOLU); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_VOLD); | ||
| 43 | } | ||
| 44 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c index 91d383162..78a77d0f8 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c | |||
| @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, | 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, |
| 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ | 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; \ No newline at end of file |
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_VOLU); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_VOLD); | ||
| 43 | } | ||
| 44 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c index 0b33e2e48..9f435715d 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c | |||
| @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, | 33 | _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, |
| 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ | 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; \ No newline at end of file |
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_VOLU); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_VOLD); | ||
| 43 | } | ||
| 44 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c index 137fa4a50..85217a940 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c | |||
| @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, | 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, |
| 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ | 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; \ No newline at end of file |
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_VOLU); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_VOLD); | ||
| 43 | } | ||
| 44 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c index 4870eaa3f..85b79f168 100644 --- a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c | |||
| @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, |
| 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ | 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; \ No newline at end of file |
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_VOLU); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_VOLD); | ||
| 43 | } | ||
| 44 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c index 89c1db021..4a49bdf0a 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c | |||
| @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, | 33 | _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, |
| 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ | 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; \ No newline at end of file |
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_VOLU); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_VOLD); | ||
| 43 | } | ||
| 44 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c index 5716cdacc..1818ea4a3 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c | |||
| @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, | 33 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, |
| 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ | 34 | MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; \ No newline at end of file |
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_VOLU); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_VOLD); | ||
| 43 | } | ||
| 44 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c index e19d3bbae..6246ffd2e 100644 --- a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c | |||
| @@ -49,12 +49,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 49 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | 49 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, |
| 50 | _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ | 50 | _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ |
| 51 | ) | 51 | ) |
| 52 | }; | 52 | }; \ No newline at end of file |
| 53 | |||
| 54 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 55 | if (clockwise) { | ||
| 56 | tap_code(KC_VOLU); | ||
| 57 | } else { | ||
| 58 | tap_code(KC_VOLD); | ||
| 59 | } | ||
| 60 | } \ No newline at end of file | ||
diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c index c9a750f45..af6d42a54 100644 --- a/keyboards/metamechs/timberwolf/timberwolf.c +++ b/keyboards/metamechs/timberwolf/timberwolf.c | |||
| @@ -27,3 +27,12 @@ bool led_update_kb(led_t led_state) { | |||
| 27 | } | 27 | } |
| 28 | return runDefault; | 28 | return runDefault; |
| 29 | } | 29 | } |
| 30 | |||
| 31 | __attribute__((weak)) | ||
| 32 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 33 | if (clockwise) { | ||
| 34 | tap_code(KC_VOLU); | ||
| 35 | } else { | ||
| 36 | tap_code(KC_VOLD); | ||
| 37 | } | ||
| 38 | } | ||
