From feaf972eb7f56a2f6dca98ed1a6b7c3c6bb9b667 Mon Sep 17 00:00:00 2001 From: Kyle McCreery Date: Fri, 18 Jun 2021 14:48:41 -1000 Subject: [PATCH] [Keyboard] Murphpad Changes and Updates (#12995) Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- keyboards/mechwild/murphpad/config.h | 4 +- .../murphpad/keymaps/default/keymap.c | 59 ++++++++------ .../mechwild/murphpad/keymaps/via/keymap.c | 81 ++++++++++--------- keyboards/mechwild/murphpad/readme.md | 2 +- 4 files changed, 80 insertions(+), 66 deletions(-) diff --git a/keyboards/mechwild/murphpad/config.h b/keyboards/mechwild/murphpad/config.h index e107ad260b..0887025ad8 100644 --- a/keyboards/mechwild/murphpad/config.h +++ b/keyboards/mechwild/murphpad/config.h @@ -36,8 +36,8 @@ along with this program. If not, see . #define UNUSED_PINS /* Encoder pins */ -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { B4 } +#define ENCODERS_PAD_A { E6, D2 } +#define ENCODERS_PAD_B { B4, D3 } /* Encoder resolution */ #define ENCODER_RESOLUTION 4 diff --git a/keyboards/mechwild/murphpad/keymaps/default/keymap.c b/keyboards/mechwild/murphpad/keymaps/default/keymap.c index 685cc9108d..eace87cd64 100644 --- a/keyboards/mechwild/murphpad/keymaps/default/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/default/keymap.c @@ -18,8 +18,8 @@ // Defines names for use in layer keycodes and the keymap enum layer_names { - _BASE, - _FN1, + _BASE, + _FN1, _FN2, _FN3 }; @@ -28,46 +28,46 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_BASE] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_MUTE, KC_P4, KC_P5, KC_P6, KC_NO, - MO(_FN1), KC_P1, KC_P2, KC_P3, KC_PENT, - KC_BSPC, KC_P0, KC_NO, KC_PDOT, KC_NO, + KC_F1, KC_F2, KC_F3, KC_F4, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_MUTE, KC_P4, KC_P5, KC_P6, _______, + MO(_FN1), KC_P1, KC_P2, KC_P3, KC_PENT, + KC_BSPC, KC_P0, _______, KC_PDOT, _______, - KC_F5, KC_F6, KC_F7 + KC_F5, KC_F6, KC_F7 ), [_FN1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SPI, RGB_HUI, _______, - _______, RGB_RMOD, RGB_TOG, RGB_MOD, KC_NO, + _______, RGB_RMOD, RGB_TOG, RGB_MOD, _______, _______, RGB_VAD, RGB_SPD, RGB_VAI, _______, - _______, RGB_SAD, KC_NO, RGB_SAI, KC_NO, + _______, RGB_SAD, _______, RGB_SAI, _______, - _______, _______, _______ + _______, _______, _______ ), - [_FN2] = LAYOUT( - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, + [_FN2] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, - + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______ ), - [_FN3] = LAYOUT( - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, + [_FN3] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, - + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______ ) @@ -82,6 +82,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_VOLD); } + break; + case 1: + if (clockwise) { + tap_code(KC_BRIU); + } else { + tap_code(KC_BRID); + } break; } return true; diff --git a/keyboards/mechwild/murphpad/keymaps/via/keymap.c b/keyboards/mechwild/murphpad/keymaps/via/keymap.c index bd74d2184f..f7d3819403 100644 --- a/keyboards/mechwild/murphpad/keymaps/via/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/via/keymap.c @@ -17,8 +17,8 @@ // Defines names for use in layer keycodes and the keymap enum layer_names { - _BASE, - _FN1, + _BASE, + _FN1, _FN2, _FN3 }; @@ -26,49 +26,49 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_BASE] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_MUTE, KC_P4, KC_P5, KC_P6, KC_NO, - MO(_FN1), KC_P1, KC_P2, KC_P3, KC_PENT, - KC_BSPC, KC_P0, KC_NO, KC_PDOT, KC_NO, - - _______, _______, _______ + KC_F1, KC_F2, KC_F3, KC_F4, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_MUTE, KC_P4, KC_P5, KC_P6, _______, + MO(_FN1), KC_P1, KC_P2, KC_P3, KC_PENT, + KC_BSPC, KC_P0, _______, KC_PDOT, _______, + + KC_F5, KC_F6, KC_F7 ), [_FN1] = LAYOUT( - _______, _______, _______, _______, - _______, _______, _______, _______, - RGB_HUD, RGB_SPI, RGB_HUI, _______, - _______, RGB_RMOD, RGB_TOG, RGB_MOD, KC_NO, - _______, RGB_VAD, RGB_SPD, RGB_VAI, _______, - _______, RGB_SAD, KC_NO, RGB_SAI, KC_NO, + _______, _______, _______, _______, + _______, _______, _______, _______, + RGB_HUD, RGB_SPI, RGB_HUI, _______, + _______, RGB_RMOD, RGB_TOG, RGB_MOD, _______, + _______, RGB_VAD, RGB_SPD, RGB_VAI, _______, + _______, RGB_SAD, _______, RGB_SAI, _______, + + _______, _______, _______ + ), + [_FN2] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______ ), - [_FN2] = LAYOUT( - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, + [_FN3] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, _______ - _______, _______, _______ - - ), - [_FN3] = LAYOUT( - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_NO, - - _______, _______, _______ - - ) + ) }; #ifdef ENCODER_ENABLE @@ -80,6 +80,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_VOLD); } + break; + case 1: + if (clockwise) { + tap_code(KC_BRIU); + } else { + tap_code(KC_BRID); + } break; } return true; diff --git a/keyboards/mechwild/murphpad/readme.md b/keyboards/mechwild/murphpad/readme.md index 6318aeae11..3f46af48b9 100644 --- a/keyboards/mechwild/murphpad/readme.md +++ b/keyboards/mechwild/murphpad/readme.md @@ -5,7 +5,7 @@ A DIY numpad kit with macro row, two additional keys, OLED, RGB Underglow, and encoder. * Keyboard Maintainer: [Kyle McCreery](https://github.com/kylemccreery) -* Hardware Supported: MurphPad v2.0 +* Hardware Supported: MurphPad v3.1 * Hardware Availability: [MurphPad on MechWild](https://mechwild.com/product/murphpad/) Make example for this keyboard (after setting up your build environment):