MechanicKeys Mini Ashen 40: refactor LAYOUT macro (#16192)

* info.json: apply friendly formatting

* move Backspace argument/keycode to top row

* info.json: correct maintainer field
This commit is contained in:
James Young 2022-02-04 11:35:29 -08:00 committed by GitHub
parent 1fffcbc298
commit 0a40916845
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 126 additions and 74 deletions

View file

@ -1,14 +1,61 @@
{
"keyboard_name": "Mini Ashen 40",
"url": "",
"maintainer": "qmk",
"maintainer": "jfescobar18",
"layouts": {
"LAYOUT": {
"layout": [
{"label": "Tab", "x": 0, "y": 0}, {"label": "Q", "x": 1, "y": 0}, {"label": "W", "x": 2, "y": 0}, {"label": "E", "x": 3, "y": 0}, {"label": "R", "x": 4, "y": 0}, {"label": "T", "x": 5, "y": 0}, {"label": "Y", "x": 6, "y": 0}, {"label": "U", "x": 7, "y": 0}, {"label": "I", "x": 8, "y": 0}, {"label": "O", "x": 9, "y": 0}, {"label": "P", "x": 10, "y": 0}, {"label": "Del", "x": 11, "y": 0}, {"label": "M1", "x": 12.25, "y": 0}, {"label": "M2", "x": 13.25, "y": 0},
{"label": "Ctrl", "x": 0, "y": 1, "w":1.25}, {"label": "A", "x": 1.25, "y": 1}, {"label": "S", "x": 2.25, "y": 1}, {"label": "D", "x": 3.25, "y": 1}, {"label": "F", "x": 4.25, "y": 1}, {"label": "G", "x": 5.25, "y": 1}, {"label": "H", "x": 6.25, "y": 1}, {"label": "J", "x": 7.25, "y": 1}, {"label": "K", "x": 8.25, "y": 1}, {"label": "L", "x": 9.25, "y": 1}, {"label": "Enter", "x": 10.25, "y": 1, "w":1.75}, {"label": "M3", "x": 12.25, "y": 1}, {"label": "M4", "x": 13.25, "y": 1},
{"label": "Shift", "x": 0, "y": 2, "w":1.75}, {"label": "Z", "x": 1.75, "y": 2}, {"label": "X", "x": 2.75, "y": 2}, {"label": "C", "x": 3.75, "y": 2}, {"label": "V", "x": 4.75, "y": 2}, {"label": "B", "x": 5.75, "y": 2}, {"label": "N", "x": 6.75, "y": 2}, {"label": "M", "x": 7.75, "y": 2}, {"label": ",", "x": 8.75, "y": 2}, {"label": ".", "x": 9.75, "y": 2}, {"label": "Fn", "x": 10.75, "y": 2, "w":1.25}, {"label": "Up", "x": 12.25, "y": 2.25},
{"label": "Alt", "x": 1, "y": 3}, {"label": "OS", "x": 2, "y": 3, "w": 1.5}, {"label": "", "x": 3.5, "y": 3, "w": 2.75}, {"label": "", "x": 6.25, "y": 3, "w": 2.25}, {"label": "Os", "x": 8.5, "y": 3, "w": 1.5}, {"label": "Alt", "x": 10, "y": 3}, {"label": "Left", "x": 11.25, "y": 3.25}, {"label": "Down", "x": 12.25, "y": 3.25}, {"label": "Right", "x": 13.25, "y": 3.25}
{"label":"Tab", "x":0, "y":0},
{"label":"Q", "x":1, "y":0},
{"label":"W", "x":2, "y":0},
{"label":"E", "x":3, "y":0},
{"label":"R", "x":4, "y":0},
{"label":"T", "x":5, "y":0},
{"label":"Y", "x":6, "y":0},
{"label":"U", "x":7, "y":0},
{"label":"I", "x":8, "y":0},
{"label":"O", "x":9, "y":0},
{"label":"P", "x":10, "y":0},
{"label":"Del", "x":11, "y":0},
{"label":"M1", "x":12.25, "y":0},
{"label":"M2", "x":13.25, "y":0},
{"label":"Ctrl", "x":0, "y":1, "w":1.25},
{"label":"A", "x":1.25, "y":1},
{"label":"S", "x":2.25, "y":1},
{"label":"D", "x":3.25, "y":1},
{"label":"F", "x":4.25, "y":1},
{"label":"G", "x":5.25, "y":1},
{"label":"H", "x":6.25, "y":1},
{"label":"J", "x":7.25, "y":1},
{"label":"K", "x":8.25, "y":1},
{"label":"L", "x":9.25, "y":1},
{"label":"Enter", "x":10.25, "y":1, "w":1.75},
{"label":"M3", "x":12.25, "y":1},
{"label":"M4", "x":13.25, "y":1},
{"label":"Shift", "x":0, "y":2, "w":1.75},
{"label":"Z", "x":1.75, "y":2},
{"label":"X", "x":2.75, "y":2},
{"label":"C", "x":3.75, "y":2},
{"label":"V", "x":4.75, "y":2},
{"label":"B", "x":5.75, "y":2},
{"label":"N", "x":6.75, "y":2},
{"label":"M", "x":7.75, "y":2},
{"label":",", "x":8.75, "y":2},
{"label":".", "x":9.75, "y":2},
{"label":"Fn", "x":10.75, "y":2, "w":1.25},
{"label":"Up", "x":12.25, "y":2.25},
{"label":"Alt", "x":1, "y":3},
{"label":"OS", "x":2, "y":3, "w":1.5},
{"label":"", "x":3.5, "y":3, "w":2.75},
{"label":"", "x":6.25, "y":3, "w":2.25},
{"label":"Os", "x":8.5, "y":3, "w":1.5},
{"label":"Alt", "x":10, "y":3},
{"label":"Left", "x":11.25, "y":3.25},
{"label":"Down", "x":12.25, "y":3.25},
{"label":"Right", "x":13.25, "y":3.25}
]
}
}

View file

@ -18,30 +18,30 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* 0: qwerty */
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MPRV, KC_MNXT,
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MPRV, KC_MNXT,
CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_MUTE, KC_MPLY,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), KC_UP, KC_BSPC,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), KC_UP,
KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT( /* 1: Symbols */
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS, 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_TRNS, KC_TRNS,
MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, 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_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, KC_EQL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT( /* 2: Fn */
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_TRNS,
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_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( /*3: Empty */
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};

View file

@ -18,30 +18,30 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* 0: qwerty */
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MPRV, KC_MNXT,
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MPRV, KC_MNXT,
CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_MUTE, KC_MPLY,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), KC_UP, KC_BSPC,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), KC_UP,
KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT( /* 1: Symbols */
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS, 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_TRNS, KC_TRNS,
MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, 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_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, KC_EQL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT( /* 2: Fn */
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_TRNS,
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_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( /*3: Empty */
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};

View file

@ -20,18 +20,23 @@
#define XXX KC_NO
/* 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.
/*
*
* 00 01 02 03 04 05 06 07 08 09 0A 2C 0B 0C
*
* 10 11 12 13 14 15 16 17 18 19 1A 1B 1C
*
* 20 21 22 23 24 25 26 27 28 29 2A
* 2B
* 30 31 33 36 38 39
* 3A 3B 3C
*
*/
#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K2C, K0B, K0C, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
K30, K31, K33, K36, K38, K39, K3A, K3B, K3C \
) \
{ \