diff options
| -rw-r--r-- | keyboards/maxr1998/pulse4k/info.json | 2 | ||||
| -rw-r--r-- | keyboards/maxr1998/pulse4k/keymaps/default/keymap.c | 13 | ||||
| -rw-r--r-- | keyboards/maxr1998/pulse4k/pulse4k.c | 16 |
3 files changed, 20 insertions, 11 deletions
diff --git a/keyboards/maxr1998/pulse4k/info.json b/keyboards/maxr1998/pulse4k/info.json index 0ac4f063c..a653f8e09 100644 --- a/keyboards/maxr1998/pulse4k/info.json +++ b/keyboards/maxr1998/pulse4k/info.json | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | "width": 3, | 6 | "width": 3, |
| 7 | "height": 2, | 7 | "height": 2, |
| 8 | "layouts": { | 8 | "layouts": { |
| 9 | "LAYOUT_pulse4k": { | 9 | "LAYOUT": { |
| 10 | "key_count": 6, | 10 | "key_count": 6, |
| 11 | "layout": [ | 11 | "layout": [ |
| 12 | { "w": 1, "x": 0, "y": 0 }, | 12 | { "w": 1, "x": 0, "y": 0 }, |
diff --git a/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c index 873c87d1f..67331235b 100644 --- a/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c +++ b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c | |||
| @@ -31,18 +31,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 31 | void matrix_init_user(void) { | 31 | void matrix_init_user(void) { |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | // Override if necessary | ||
| 35 | /* | ||
| 34 | void encoder_one_update(bool clockwise) { | 36 | void encoder_one_update(bool clockwise) { |
| 35 | if (clockwise) { | ||
| 36 | tap_code(KC_PGDN); | ||
| 37 | } else { | ||
| 38 | tap_code(KC_PGUP); | ||
| 39 | } | ||
| 40 | } | 37 | } |
| 41 | 38 | ||
| 42 | void encoder_two_update(bool clockwise) { | 39 | void encoder_two_update(bool clockwise) { |
| 43 | if (clockwise) { | ||
| 44 | tap_code(KC_VOLU); | ||
| 45 | } else { | ||
| 46 | tap_code(KC_VOLD); | ||
| 47 | } | ||
| 48 | } | 40 | } |
| 41 | //*/ | ||
diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c index ee3d41ccd..2ec9dca73 100644 --- a/keyboards/maxr1998/pulse4k/pulse4k.c +++ b/keyboards/maxr1998/pulse4k/pulse4k.c | |||
| @@ -59,3 +59,19 @@ void encoder_update_kb(uint8_t index, bool clockwise) { | |||
| 59 | } else encoder_two_update(clockwise); | 59 | } else encoder_two_update(clockwise); |
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | |||
| 63 | __attribute__((weak)) void encoder_one_update(bool clockwise) { | ||
| 64 | if (clockwise) { | ||
| 65 | tap_code(KC_PGDN); | ||
| 66 | } else { | ||
| 67 | tap_code(KC_PGUP); | ||
| 68 | } | ||
| 69 | } | ||
| 70 | |||
| 71 | __attribute__((weak)) void encoder_two_update(bool clockwise) { | ||
| 72 | if (clockwise) { | ||
| 73 | tap_code(KC_VOLU); | ||
| 74 | } else { | ||
| 75 | tap_code(KC_VOLD); | ||
| 76 | } | ||
| 77 | } | ||
