From debb0ecb5da7bfd5f8b6b2f76d1d68c070073543 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 21 Nov 2021 22:21:20 +0000 Subject: [PATCH] MW65 RGB Layout Macro Refactor (#15246) * mw65_rgb.h: use QMK 3-character notation for matrix identifiers * mw65_rgb.h: add matrix diagram * info.json: apply friendly formatting Update key labels for QMK CLI rendering. * move rotary encoder keycodes to top row * info.json: update maintainer field Use the maintainer's GitHub username. --- keyboards/mwstudio/mw65_rgb/info.json | 52 +++++++++---------- .../mw65_rgb/keymaps/default/keymap.c | 30 +++++------ .../mwstudio/mw65_rgb/keymaps/via/keymap.c | 32 ++++++------ keyboards/mwstudio/mw65_rgb/mw65_rgb.h | 38 ++++++++++---- 4 files changed, 84 insertions(+), 68 deletions(-) diff --git a/keyboards/mwstudio/mw65_rgb/info.json b/keyboards/mwstudio/mw65_rgb/info.json index affcdadbc0..870a848b85 100644 --- a/keyboards/mwstudio/mw65_rgb/info.json +++ b/keyboards/mwstudio/mw65_rgb/info.json @@ -1,25 +1,27 @@ { "keyboard_name": "MW65_RGB", "url": "", - "maintainer": "qmk", + "maintainer": "TW59420", "layouts": { "LAYOUT": { "layout": [ - {"label":"ESC", "x":0, "y":0}, - {"label":"1", "x":1, "y":0}, - {"label":"2", "x":2, "y":0}, - {"label":"3", "x":3, "y":0}, - {"label":"4", "x":4, "y":0}, - {"label":"5", "x":5, "y":0}, - {"label":"6", "x":6, "y":0}, - {"label":"7", "x":7, "y":0}, - {"label":"8", "x":8, "y":0}, - {"label":"9", "x":9, "y":0}, - {"label":"0", "x":10, "y":0}, - {"label":"-", "x":11, "y":0}, - {"label":"=", "x":12, "y":0}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, - {"label":"Delete", "x":15, "y":0}, + {"label":"Encoder CCW", "x":15, "y":0, "w":0.5}, + {"label":"Delete", "x":15.5, "y":0}, + {"label":"Encoder CW", "x":16.5, "y":0, "w":0.5}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, @@ -32,9 +34,9 @@ {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, - {"label":"[", "x":11.5, "y":1}, - {"label":"]", "x":12.5, "y":1}, - {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, @@ -47,8 +49,8 @@ {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, - {"label":";", "x":10.75, "y":2}, - {"label":"'", "x":11.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, @@ -60,9 +62,9 @@ {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, - {"label":",", "x":9.25, "y":3}, - {"label":".", "x":10.25, "y":3}, - {"label":"/", "x":11.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, @@ -70,9 +72,7 @@ {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, - {"label":"Vol-", "x":3.75, "y":4 }, - {"label":"Vol+", "x":4.75, "y":4 }, - {"x":5.75, "y":4, "w":4.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c index 9466b0f283..7028a223c5 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c +++ b/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c @@ -18,34 +18,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, - KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_VOLD, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_DEL, KC_VOLU, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_HUI, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_HUI, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, - _______, _______, _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI + _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI ), [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c index 6506433998..78a17233e3 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c @@ -29,35 +29,35 @@ user_config_t user_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, - KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_VOLD, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_DEL, KC_VOLU, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_HUI, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_HUI, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER00, RGB_SAI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER01, RGB_VAI, RGB_SAD, - _______, _______, _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER01, RGB_VAI, RGB_SAD, + _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI ), [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/mwstudio/mw65_rgb/mw65_rgb.h b/keyboards/mwstudio/mw65_rgb/mw65_rgb.h index b491e324e2..fb769eda08 100644 --- a/keyboards/mwstudio/mw65_rgb/mw65_rgb.h +++ b/keyboards/mwstudio/mw65_rgb/mw65_rgb.h @@ -17,17 +17,33 @@ #include "quantum.h" +#define XXX KC_NO + +/* 44 ◯ 43 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1E │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │2E │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │40 │41 │42 │46 │4A │4B │ │4C │4D │4E │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ - K400, K401, K402, K403, K404, K406, K410, K411, K412, K413, K414 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K44, K0E, K43, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214 }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ - { K400, K401, K402, K403, K404, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ }