From e864786c0b64423aa2fa83f2cc8a2049af9957fd Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 21 Nov 2021 22:38:31 +0000 Subject: Ocean Wang Ergo: Fix QMK Configurator Implementation (#15249) * info.json: apply friendly formatting * info.json: update labels; reposition keys * wang_ergo.h: use XXX for KC_NO * wang_ergo.h: add matrix diagram * rename LAYOUT to LAYOUT_all * move Backspace keycode to top row Moves the matrix argument/keycode for Backspace to its proper position at the end of the top row. * add LAYOUT_2x2u with keymap * info.json: update maintainer field Use the maintainer's GitHub username. --- keyboards/ocean/wang_ergo/info.json | 116 +++++++++++++++++++-- keyboards/ocean/wang_ergo/keymaps/default/keymap.c | 10 +- .../ocean/wang_ergo/keymaps/default_2x2u/keymap.c | 24 +++++ keyboards/ocean/wang_ergo/keymaps/via/keymap.c | 40 +++---- keyboards/ocean/wang_ergo/wang_ergo.h | 48 +++++++-- 5 files changed, 198 insertions(+), 40 deletions(-) create mode 100644 keyboards/ocean/wang_ergo/keymaps/default_2x2u/keymap.c (limited to 'keyboards/ocean') diff --git a/keyboards/ocean/wang_ergo/info.json b/keyboards/ocean/wang_ergo/info.json index 7853de6a44..5ade58c54c 100644 --- a/keyboards/ocean/wang_ergo/info.json +++ b/keyboards/ocean/wang_ergo/info.json @@ -1,10 +1,114 @@ { - "keyboard_name": "Wang Ergo", - "url": "", - "maintainer": "Ocean", + "keyboard_name": "Wang Ergo", + "url": "", + "maintainer": "oceeean", + "layout_aliases": { + "LAYOUT": "LAYOUT_all" + }, "layouts": { - "LAYOUT": { - "layout": [{"label":"0,0", "x":1.75, "y":2.25}, {"label":"0,11", "x":15.15, "y":2.25}, {"label":"3,10", "x":16.15, "y":2.25}, {"label":"1,0", "x":1.5, "y":3.25, "w":1.25}, {"label":"1,11", "x":15.15, "y":3.25, "w":1.75}, {"label":"2,0", "x":1, "y":4.25, "w":1.75}, {"label":"2,11", "x":15.15, "y":4.25, "w":1.25}, {"label":"3,0", "x":0.75, "y":5.25}, {"label":"3,1", "x":1.75, "y":5.25}, {"label":"3,11", "x":15.15, "y":5.25}, {"label":"0,1", "x":3.15, "y":2}, {"label":"1,1", "x":3.15, "y":3}, {"label":"2,1", "x":3.15, "y":4}, {"label":"0,2", "x":4.5, "y":1.75}, {"label":"0,3", "x":5.5, "y":1.75}, {"label":"0,4", "x":6.5, "y":1.75}, {"label":"0,5", "x":7.5, "y":1.75}, {"label":"1,2", "x":4.5, "y":2.75}, {"label":"1,3", "x":5.5, "y":2.75}, {"label":"1,4", "x":6.5, "y":2.75}, {"label":"1,5", "x":7.5, "y":2.75}, {"label":"2,2", "x":4.5, "y":3.75}, {"label":"2,3", "x":5.5, "y":3.75}, {"label":"2,4", "x":6.5, "y":3.75}, {"label":"2,5", "x":7.5, "y":3.75}, {"label":"3,3", "x":5.5, "y":4.75}, {"label":"3,4", "x":6.5, "y":4.75}, {"label":"3,5", "x":7.5, "y":4.75}, {"label":"0,6", "x":9.25, "y":4.25}, {"label":"0,7", "x":10.25, "y":4.25}, {"label":"0,8", "x":11.25, "y":4.25}, {"label":"0,9", "x":12.25, "y":4.25}, {"label":"1,6", "x":9.25, "y":5.25}, {"label":"1,7", "x":10.25, "y":5.25}, {"label":"1,8", "x":11.25, "y":5.25}, {"label":"1,9", "x":12.25, "y":5.25}, {"label":"2,6", "x":9.25, "y":6.25}, {"label":"2,7", "x":10.25, "y":6.25}, {"label":"2,8", "x":11.25, "y":6.25}, {"label":"2,9", "x":12.25, "y":6.25}, {"label":"3,6", "x":9.25, "y":7.25}, {"label":"3,7", "x":10.25, "y":7.25}, {"label":"3,8", "x":11.25, "y":7.25}, {"label":"0,10", "x":13.75, "y":3.25}, {"label":"1,10", "x":13.75, "y":4.25}, {"label":"2,10", "x":13.75, "y":5.25}] + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":1, "y":0}, + {"label":"Q", "x":2, "y":0}, + {"label":"W", "x":3, "y":0}, + {"label":"E", "x":4, "y":0}, + {"label":"R", "x":5, "y":0}, + {"label":"T", "x":6, "y":0}, + {"label":"Y", "x":8, "y":0}, + {"label":"U", "x":9, "y":0}, + {"label":"I", "x":10, "y":0}, + {"label":"O", "x":11, "y":0}, + {"label":"P", "x":12, "y":0}, + {"label":"Del", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + + {"label":"Tab", "x":0.75, "y":1, "w":1.25}, + {"label":"A", "x":2, "y":1}, + {"label":"S", "x":3, "y":1}, + {"label":"D", "x":4, "y":1}, + {"label":"F", "x":5, "y":1}, + {"label":"G", "x":6, "y":1}, + {"label":"H", "x":8, "y":1}, + {"label":"J", "x":9, "y":1}, + {"label":"K", "x":10, "y":1}, + {"label":"L", "x":11, "y":1}, + {"label":";:", "x":12, "y":1}, + {"label":"Enter", "x":13, "y":1, "w":1.75}, + + {"label":"Shift", "x":0.25, "y":2, "w":1.75}, + {"label":"Z", "x":2, "y":2}, + {"label":"X", "x":3, "y":2}, + {"label":"C", "x":4, "y":2}, + {"label":"V", "x":5, "y":2}, + {"label":"B", "x":6, "y":2}, + {"label":"N", "x":8, "y":2}, + {"label":"M", "x":9, "y":2}, + {"label":",<", "x":10, "y":2}, + {"label":".>", "x":11, "y":2}, + {"label":"/?", "x":12, "y":2}, + {"label":"Fn", "x":13, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"GUI", "x":1, "y":3}, + {"label":"Alt", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3}, + {"label":"Space", "x":6, "y":3}, + {"label":"Space", "x":8, "y":3}, + {"label":"Space", "x":9, "y":3}, + {"label":"Alt", "x":10, "y":3}, + {"label":"Ctrl", "x":13, "y":3} + ] + }, + "LAYOUT_2x2u": { + "layout": [ + {"label":"Esc", "x":1, "y":0}, + {"label":"Q", "x":2, "y":0}, + {"label":"W", "x":3, "y":0}, + {"label":"E", "x":4, "y":0}, + {"label":"R", "x":5, "y":0}, + {"label":"T", "x":6, "y":0}, + {"label":"Y", "x":8, "y":0}, + {"label":"U", "x":9, "y":0}, + {"label":"I", "x":10, "y":0}, + {"label":"O", "x":11, "y":0}, + {"label":"P", "x":12, "y":0}, + {"label":"Del", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + + {"label":"Tab", "x":0.75, "y":1, "w":1.25}, + {"label":"A", "x":2, "y":1}, + {"label":"S", "x":3, "y":1}, + {"label":"D", "x":4, "y":1}, + {"label":"F", "x":5, "y":1}, + {"label":"G", "x":6, "y":1}, + {"label":"H", "x":8, "y":1}, + {"label":"J", "x":9, "y":1}, + {"label":"K", "x":10, "y":1}, + {"label":"L", "x":11, "y":1}, + {"label":";:", "x":12, "y":1}, + {"label":"Enter", "x":13, "y":1, "w":1.75}, + + {"label":"Shift", "x":0.25, "y":2, "w":1.75}, + {"label":"Z", "x":2, "y":2}, + {"label":"X", "x":3, "y":2}, + {"label":"C", "x":4, "y":2}, + {"label":"V", "x":5, "y":2}, + {"label":"B", "x":6, "y":2}, + {"label":"N", "x":8, "y":2}, + {"label":"M", "x":9, "y":2}, + {"label":",<", "x":10, "y":2}, + {"label":".>", "x":11, "y":2}, + {"label":"/?", "x":12, "y":2}, + {"label":"Fn", "x":13, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"GUI", "x":1, "y":3}, + {"label":"Alt", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3, "w":2}, + {"label":"Space", "x":8, "y":3, "w":2}, + {"label":"Alt", "x":10, "y":3}, + {"label":"Ctrl", "x":13, "y":3} + ] } } -} \ No newline at end of file +} diff --git a/keyboards/ocean/wang_ergo/keymaps/default/keymap.c b/keyboards/ocean/wang_ergo/keymaps/default/keymap.c index 623f574cd2..a50dde256b 100644 --- a/keyboards/ocean/wang_ergo/keymaps/default/keymap.c +++ b/keyboards/ocean/wang_ergo/keymaps/default/keymap.c @@ -15,10 +15,10 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_BSPC, KC_RCTL + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL ), }; diff --git a/keyboards/ocean/wang_ergo/keymaps/default_2x2u/keymap.c b/keyboards/ocean/wang_ergo/keymaps/default_2x2u/keymap.c new file mode 100644 index 0000000000..7177819e45 --- /dev/null +++ b/keyboards/ocean/wang_ergo/keymaps/default_2x2u/keymap.c @@ -0,0 +1,24 @@ +/* Copyright 2021 Ocean + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_2x2u( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RCTL + ), +}; diff --git a/keyboards/ocean/wang_ergo/keymaps/via/keymap.c b/keyboards/ocean/wang_ergo/keymaps/via/keymap.c index 431dac64e4..c13785686f 100644 --- a/keyboards/ocean/wang_ergo/keymaps/via/keymap.c +++ b/keyboards/ocean/wang_ergo/keymaps/via/keymap.c @@ -15,31 +15,31 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_BSPC, KC_RCTL + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL ), - [1] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/ocean/wang_ergo/wang_ergo.h b/keyboards/ocean/wang_ergo/wang_ergo.h index c57cc6c671..68074c2998 100644 --- a/keyboards/ocean/wang_ergo/wang_ergo.h +++ b/keyboards/ocean/wang_ergo/wang_ergo.h @@ -17,15 +17,45 @@ #include "quantum.h" -#define LAYOUT(\ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K33, K34, K35, K36, K37, K38, K3A, K3B \ +#define XXX KC_NO + +/* + * ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │ │06 │07 │08 │09 │0A │0B │3A │ + * ┌┴───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┴──┬┘ + * │10 │11 │12 │13 │14 │15 │ │16 │17 │18 │19 │1A │1B │ + * ┌─┴────┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼────┬─┘ + * │20 │21 │22 │23 │24 │25 │ │26 │27 │28 │29 │2A │2B │ + * ┌┴──┬───┼───┴───┼───┼───┼───┤ ├───┼───┼───┼───┴───┼───┬┘ + * │30 │31 │ │33 │34 │35 │ │36 │37 │38 │ │3B │ + * └───┴───┘ └───┴───┴───┘ └───┴───┴───┘ └───┘ + * ┌───────┐ ┌───────┐ + * │35 │ │36 │ + * └───────┘ └───────┘ + */ + +#define LAYOUT_all(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K3A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K33, K34, K35, K36, K37, K38, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, XXX, K33, K34, K35, K36, K37, K38, XXX, K3A, K3B }, \ +} + +#define LAYOUT_2x2u(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K3A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K33, K35, K36, K38, K3B \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, KC_NO, K33, K34, K35, K36, K37, K38, KC_NO, K3A, K3B }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, XXX, K33, XXX, K35, K36, XXX, K38, XXX, K3A, K3B }, \ } -- cgit v1.2.1