diff options
author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2023-04-15 10:36:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 10:36:11 -0700 |
commit | d732b0b8497cb4a67dc1ce706dd26a0610e15293 (patch) | |
tree | 818fba4a4797f0fc3787186eb3add8deaea27214 | |
parent | 6d965d486c08166c6d6d8d699721a02b053d35d0 (diff) |
ADPenrose Obi Layout Macro Conversion and Addition (#20445)
* add matrix_diagram.md
* info.json: apply friendly formatting
* move matrix data to info.json
* add LAYOUT_625u_space with reference keymap
-rw-r--r-- | keyboards/adpenrose/obi/info.json | 163 | ||||
-rw-r--r-- | keyboards/adpenrose/obi/keymaps/default_625u_space/keymap.c | 41 | ||||
-rw-r--r-- | keyboards/adpenrose/obi/keymaps/default_625u_space/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/adpenrose/obi/matrix_diagram.md | 16 | ||||
-rw-r--r-- | keyboards/adpenrose/obi/obi.c | 5 | ||||
-rw-r--r-- | keyboards/adpenrose/obi/obi.h | 26 |
6 files changed, 168 insertions, 84 deletions
diff --git a/keyboards/adpenrose/obi/info.json b/keyboards/adpenrose/obi/info.json index c0c1b73c64..ce4ba7b47e 100644 --- a/keyboards/adpenrose/obi/info.json +++ b/keyboards/adpenrose/obi/info.json @@ -17,60 +17,117 @@ "layouts": { "LAYOUT_all": { "layout": [ - {"label":"F1", "x":0, "y":0}, - {"label":"Tab", "x":1.25, "y":0, "w":1.5}, - {"label":"Q", "x":2.75, "y":0}, - {"label":"W", "x":3.75, "y":0}, - {"label":"E", "x":4.75, "y":0}, - {"label":"R", "x":5.75, "y":0}, - {"label":"T", "x":6.75, "y":0}, - {"label":"Y", "x":7.75, "y":0}, - {"label":"U", "x":8.75, "y":0}, - {"label":"I", "x":9.75, "y":0}, - {"label":"O", "x":10.75, "y":0}, - {"label":"P", "x":11.75, "y":0}, - {"label":"{", "x":12.75, "y":0}, - {"label":"Backspace", "x":13.75, "y":0, "w":1.5}, + {"label": "F1", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "Tab", "matrix": [0, 1], "x": 1.25, "y": 0, "w": 1.5}, + {"label": "Q", "matrix": [0, 2], "x": 2.75, "y": 0}, + {"label": "W", "matrix": [0, 3], "x": 3.75, "y": 0}, + {"label": "E", "matrix": [0, 4], "x": 4.75, "y": 0}, + {"label": "R", "matrix": [0, 5], "x": 5.75, "y": 0}, + {"label": "T", "matrix": [0, 6], "x": 6.75, "y": 0}, + {"label": "Y", "matrix": [0, 7], "x": 7.75, "y": 0}, + {"label": "U", "matrix": [0, 8], "x": 8.75, "y": 0}, + {"label": "I", "matrix": [0, 9], "x": 9.75, "y": 0}, + {"label": "O", "matrix": [0, 10], "x": 10.75, "y": 0}, + {"label": "P", "matrix": [0, 11], "x": 11.75, "y": 0}, + {"label": "{", "matrix": [0, 12], "x": 12.75, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13.75, "y": 0, "w": 1.5}, - {"label":"F2", "x":0, "y":1}, - {"label":"Caps Lock", "x":1.25, "y":1, "w":1.75}, - {"label":"A", "x":3, "y":1}, - {"label":"S", "x":4, "y":1}, - {"label":"D", "x":5, "y":1}, - {"label":"F", "x":6, "y":1}, - {"label":"G", "x":7, "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":2.25}, - - {"label":"F3", "x":0, "y":2}, - {"label":"Shift", "x":1.25, "y":2, "w":2.25}, - {"label":"Z", "x":3.5, "y":2}, - {"label":"X", "x":4.5, "y":2}, - {"label":"C", "x":5.5, "y":2}, - {"label":"V", "x":6.5, "y":2}, - {"label":"B", "x":7.5, "y":2}, - {"label":"N", "x":8.5, "y":2}, - {"label":"M", "x":9.5, "y":2}, - {"label":"<", "x":10.5, "y":2}, - {"label":"Shift", "x":11.5, "y":2, "w":1.75}, - {"label":"Up", "x":13.25, "y":2}, - {"label":"?", "x":14.25, "y":2}, - - {"label":"F4", "x":0, "y":3}, - {"label":"Ctrl", "x":1.25, "y":3, "w":1.25}, - {"label":"Win", "x":2.5, "y":3}, - {"label":"Alt", "x":3.5, "y":3, "w":1.25}, - {"label":"Spacebar", "x":4.75, "y":3, "w":2.25}, - {"label":"Spacebar", "x":7, "y":3, "w":1.25}, - {"label":"Spacebar", "x":8.25, "y":3, "w":2.75}, - {"label":"Alt", "x":11, "y":3, "w":1.25}, - {"label":"Left", "x":12.25, "y":3}, - {"label":"Down", "x":13.25, "y":3}, - {"label":"Right", "x":14.25, "y":3} + {"label": "F2", "matrix": [1, 0], "x": 0, "y": 1}, + {"label": "Caps Lock", "matrix": [1, 1], "x": 1.25, "y": 1, "w": 1.75}, + {"label": "A", "matrix": [1, 2], "x": 3, "y": 1}, + {"label": "S", "matrix": [1, 3], "x": 4, "y": 1}, + {"label": "D", "matrix": [1, 4], "x": 5, "y": 1}, + {"label": "F", "matrix": [1, 5], "x": 6, "y": 1}, + {"label": "G", "matrix": [1, 6], "x": 7, "y": 1}, + {"label": "H", "matrix": [1, 7], "x": 8, "y": 1}, + {"label": "J", "matrix": [1, 8], "x": 9, "y": 1}, + {"label": "K", "matrix": [1, 9], "x": 10, "y": 1}, + {"label": "L", "matrix": [1, 10], "x": 11, "y": 1}, + {"label": ":", "matrix": [1, 11], "x": 12, "y": 1}, + {"label": "Enter", "matrix": [1, 13], "x": 13, "y": 1, "w": 2.25}, + + {"label": "F3", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "Shift", "matrix": [2, 1], "x": 1.25, "y": 2, "w": 2.25}, + {"label": "Z", "matrix": [2, 2], "x": 3.5, "y": 2}, + {"label": "X", "matrix": [2, 3], "x": 4.5, "y": 2}, + {"label": "C", "matrix": [2, 4], "x": 5.5, "y": 2}, + {"label": "V", "matrix": [2, 5], "x": 6.5, "y": 2}, + {"label": "B", "matrix": [2, 6], "x": 7.5, "y": 2}, + {"label": "N", "matrix": [2, 7], "x": 8.5, "y": 2}, + {"label": "M", "matrix": [2, 8], "x": 9.5, "y": 2}, + {"label": "<", "matrix": [2, 9], "x": 10.5, "y": 2}, + {"label": "Shift", "matrix": [2, 10], "x": 11.5, "y": 2, "w": 1.75}, + {"label": "Up", "matrix": [2, 12], "x": 13.25, "y": 2}, + {"label": "?", "matrix": [2, 13], "x": 14.25, "y": 2}, + + {"label": "F4", "matrix": [3, 0], "x": 0, "y": 3}, + {"label": "Ctrl", "matrix": [3, 1], "x": 1.25, "y": 3, "w": 1.25}, + {"label": "Win", "matrix": [3, 2], "x": 2.5, "y": 3}, + {"label": "Alt", "matrix": [3, 3], "x": 3.5, "y": 3, "w": 1.25}, + {"label": "Spacebar", "matrix": [3, 5], "x": 4.75, "y": 3, "w": 2.25}, + {"label": "Spacebar", "matrix": [3, 6], "x": 7, "y": 3, "w": 1.25}, + {"label": "Spacebar", "matrix": [3, 7], "x": 8.25, "y": 3, "w": 2.75}, + {"label": "Alt", "matrix": [3, 10], "x": 11, "y": 3, "w": 1.25}, + {"label": "Left", "matrix": [3, 11], "x": 12.25, "y": 3}, + {"label": "Down", "matrix": [3, 12], "x": 13.25, "y": 3}, + {"label": "Right", "matrix": [3, 13], "x": 14.25, "y": 3} + ] + }, + + "LAYOUT_625u_space": { + "layout": [ + {"label": "F1", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "Tab", "matrix": [0, 1], "x": 1.25, "y": 0, "w": 1.5}, + {"label": "Q", "matrix": [0, 2], "x": 2.75, "y": 0}, + {"label": "W", "matrix": [0, 3], "x": 3.75, "y": 0}, + {"label": "E", "matrix": [0, 4], "x": 4.75, "y": 0}, + {"label": "R", "matrix": [0, 5], "x": 5.75, "y": 0}, + {"label": "T", "matrix": [0, 6], "x": 6.75, "y": 0}, + {"label": "Y", "matrix": [0, 7], "x": 7.75, "y": 0}, + {"label": "U", "matrix": [0, 8], "x": 8.75, "y": 0}, + {"label": "I", "matrix": [0, 9], "x": 9.75, "y": 0}, + {"label": "O", "matrix": [0, 10], "x": 10.75, "y": 0}, + {"label": "P", "matrix": [0, 11], "x": 11.75, "y": 0}, + {"label": "{", "matrix": [0, 12], "x": 12.75, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13.75, "y": 0, "w": 1.5}, + + {"label": "F2", "matrix": [1, 0], "x": 0, "y": 1}, + {"label": "Caps Lock", "matrix": [1, 1], "x": 1.25, "y": 1, "w": 1.75}, + {"label": "A", "matrix": [1, 2], "x": 3, "y": 1}, + {"label": "S", "matrix": [1, 3], "x": 4, "y": 1}, + {"label": "D", "matrix": [1, 4], "x": 5, "y": 1}, + {"label": "F", "matrix": [1, 5], "x": 6, "y": 1}, + {"label": "G", "matrix": [1, 6], "x": 7, "y": 1}, + {"label": "H", "matrix": [1, 7], "x": 8, "y": 1}, + {"label": "J", "matrix": [1, 8], "x": 9, "y": 1}, + {"label": "K", "matrix": [1, 9], "x": 10, "y": 1}, + {"label": "L", "matrix": [1, 10], "x": 11, "y": 1}, + {"label": ":", "matrix": [1, 11], "x": 12, "y": 1}, + {"label": "Enter", "matrix": [1, 13], "x": 13, "y": 1, "w": 2.25}, + + {"label": "F3", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "Shift", "matrix": [2, 1], "x": 1.25, "y": 2, "w": 2.25}, + {"label": "Z", "matrix": [2, 2], "x": 3.5, "y": 2}, + {"label": "X", "matrix": [2, 3], "x": 4.5, "y": 2}, + {"label": "C", "matrix": [2, 4], "x": 5.5, "y": 2}, + {"label": "V", "matrix": [2, 5], "x": 6.5, "y": 2}, + {"label": "B", "matrix": [2, 6], "x": 7.5, "y": 2}, + {"label": "N", "matrix": [2, 7], "x": 8.5, "y": 2}, + {"label": "M", "matrix": [2, 8], "x": 9.5, "y": 2}, + {"label": "<", "matrix": [2, 9], "x": 10.5, "y": 2}, + {"label": "Shift", "matrix": [2, 10], "x": 11.5, "y": 2, "w": 1.75}, + {"label": "Up", "matrix": [2, 12], "x": 13.25, "y": 2}, + {"label": "?", "matrix": [2, 13], "x": 14.25, "y": 2}, + + {"label": "F4", "matrix": [3, 0], "x": 0, "y": 3}, + {"label": "Ctrl", "matrix": [3, 1], "x": 1.25, "y": 3, "w": 1.25}, + {"label": "Win", "matrix": [3, 2], "x": 2.5, "y": 3}, + {"label": "Alt", "matrix": [3, 3], "x": 3.5, "y": 3, "w": 1.25}, + {"label": "Spacebar", "matrix": [3, 6], "x": 4.75, "y": 3, "w": 6.25}, + {"label": "Alt", "matrix": [3, 10], "x": 11, "y": 3, "w": 1.25}, + {"label": "Left", "matrix": [3, 11], "x": 12.25, "y": 3}, + {"label": "Down", "matrix": [3, 12], "x": 13.25, "y": 3}, + {"label": "Right", "matrix": [3, 13], "x": 14.25, "y": 3} ] } } diff --git a/keyboards/adpenrose/obi/keymaps/default_625u_space/keymap.c b/keyboards/adpenrose/obi/keymaps/default_625u_space/keymap.c new file mode 100644 index 0000000000..defb516962 --- /dev/null +++ b/keyboards/adpenrose/obi/keymaps/default_625u_space/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2022 Arturo Avila (@ADPenrose) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_625u_space( + KC_ESC, 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_BSPC, + KC_MUTE, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_VOLU, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_UP, KC_SLSH, + KC_VOLD, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_625u_space( + KC_DEL, KC_TRNS, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_625u_space( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_RBRC, + KC_TRNS, QK_BOOT, 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_625u_space( + 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, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } +}; +#endif diff --git a/keyboards/adpenrose/obi/keymaps/default_625u_space/rules.mk b/keyboards/adpenrose/obi/keymaps/default_625u_space/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/adpenrose/obi/keymaps/default_625u_space/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/adpenrose/obi/matrix_diagram.md b/keyboards/adpenrose/obi/matrix_diagram.md new file mode 100644 index 0000000000..b4af2f8ac8 --- /dev/null +++ b/keyboards/adpenrose/obi/matrix_diagram.md @@ -0,0 +1,16 @@ +# Matrix Diagram for ADPenrose Obi + +``` +┌───┐┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +│00 ││01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │ +├───┤├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│10 ││11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1D │ +├───┤├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│20 ││21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2C │2D │ +├───┤├────┬───┼───┴┬──┴───┴─┬─┴──┬┴───┴───┴─┬─┴──┬───┼───┼───┤ +│30 ││31 │32 │33 │35 │36 │37 │3A │3B │3C │3D │ +└───┘└────┴───┴────┴────────┴────┴──────────┴────┴───┴───┴───┘ + ┌────────────────────────┐ + │36 │ 6.25u Space + └────────────────────────┘ +``` diff --git a/keyboards/adpenrose/obi/obi.c b/keyboards/adpenrose/obi/obi.c deleted file mode 100644 index 2efd4eba47..0000000000 --- a/keyboards/adpenrose/obi/obi.c +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2022 Arturo Avila (@ADPenrose) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "obi.h" - diff --git a/keyboards/adpenrose/obi/obi.h b/keyboards/adpenrose/obi/obi.h deleted file mode 100644 index 09bf9b29fc..0000000000 --- a/keyboards/adpenrose/obi/obi.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2022 Arturo Avila (@ADPenrose) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "quantum.h" - -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, K2D, \ - K30, K31, K32, K33, K35, K36, K37, K3A, K3B, K3C, K3D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_NO, K2C, K2D }, \ - { K30, K31, K32, K33, KC_NO, K35, K36, K37, KC_NO, KC_NO, K3A, K3B, K3C, K3D } \ -} |