1
0
Fork 0

Kopibeng XT65: Layout Macro Refactor (#13476)

This commit is contained in:
James Young 2021-07-06 18:27:23 -07:00 committed by GitHub
parent b976fcbb44
commit 692d0268ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 245 additions and 85 deletions

View file

@ -1,80 +1,240 @@
{
"keyboard_name": "kopibeng XT65",
"url": "",
"maintainer": "kopibeng",
"width": 16,
"height": 5,
"keyboard_name": "kopibeng XT65",
"url": "",
"maintainer": "kopibeng",
"width": 16,
"height": 5,
"layout_aliases": {
"LAYOUT_65_7u_split_bs": "LAYOUT_65_ansi_blocker_tsangan_split_bs",
"LAYOUT_all": "LAYOUT_65_ansi_blocker_split_bs",
"LAYOUT_65_625u": "LAYOUT_65_ansi_blocker"
},
"layouts": {
"LAYOUT": {
"LAYOUT_65_ansi_blocker": {
"layout": [
{"label":"K00 (B5,D1)", "x":0, "y":0},
{"label":"K01 (B5,D2)", "x":1, "y":0},
{"label":"K02 (B5,D3)", "x":2, "y":0},
{"label":"K03 (B5,B6)", "x":3, "y":0},
{"label":"K04 (B5,C6)", "x":4, "y":0},
{"label":"K05 (B5,C7)", "x":5, "y":0},
{"label":"K06 (B5,F0)", "x":6, "y":0},
{"label":"K07 (B5,F1)", "x":7, "y":0},
{"label":"K08 (B5,F4)", "x":8, "y":0},
{"label":"K09 (B5,F5)", "x":9, "y":0},
{"label":"K0A (B5,F6)", "x":10, "y":0},
{"label":"K0B (B5,F7)", "x":11, "y":0},
{"label":"K0C (B5,B2)", "x":12, "y":0},
{"label":"K0D (B5,B3)", "x":13, "y":0},
{"label":"K1D (B4,B3)", "x":14, "y":0},
{"label":"K0E (B5,B7)", "x":15, "y":0},
{"label":"K10 (B4,D1)", "x":0, "y":1, "w":1.5},
{"label":"K11 (B4,D2)", "x":1.5, "y":1},
{"label":"K12 (B4,D3)", "x":2.5, "y":1},
{"label":"K13 (B4,B6)", "x":3.5, "y":1},
{"label":"K14 (B4,C6)", "x":4.5, "y":1},
{"label":"K15 (B4,C7)", "x":5.5, "y":1},
{"label":"K16 (B4,F0)", "x":6.5, "y":1},
{"label":"K17 (B4,F1)", "x":7.5, "y":1},
{"label":"K18 (B4,F4)", "x":8.5, "y":1},
{"label":"K19 (B4,F5)", "x":9.5, "y":1},
{"label":"K1A (B4,F6)", "x":10.5, "y":1},
{"label":"K1B (B4,F7)", "x":11.5, "y":1},
{"label":"K1C (B4,B2)", "x":12.5, "y":1},
{"label":"K2D (D7,B3)", "x":13.5, "y":1, "w":1.5},
{"label":"K1E (B4,B7)", "x":15, "y":1},
{"label":"K20 (D7,D1)", "x":0, "y":2, "w":1.25},
{"label":"K21 (D7,D2)", "x":1.75, "y":2},
{"label":"K22 (D7,D3)", "x":2.75, "y":2},
{"label":"K23 (D7,B6)", "x":3.75, "y":2},
{"label":"K24 (D7,C6)", "x":4.75, "y":2},
{"label":"K25 (D7,C7)", "x":5.75, "y":2},
{"label":"K26 (D7,F0)", "x":6.75, "y":2},
{"label":"K27 (D7,F1)", "x":7.75, "y":2},
{"label":"K28 (D7,F4)", "x":8.75, "y":2},
{"label":"K29 (D7,F5)", "x":9.75, "y":2},
{"label":"K2A (D7,F6)", "x":10.75, "y":2},
{"label":"K2B (D7,F7)", "x":11.75, "y":2},
{"label":"K2C (D7,B2)", "x":12.75, "y":2, "w":2.25},
{"label":"K2E (D7,B7)", "x":15, "y":2},
{"label":"K30 (D6,D1)", "x":0, "y":3, "w":2.25},
{"label":"K31 (D6,D2)", "x":2.25, "y":3},
{"label":"K32 (D6,D3)", "x":3.25, "y":3},
{"label":"K33 (D6,B6)", "x":4.25, "y":3},
{"label":"K34 (D6,C6)", "x":5.25, "y":3},
{"label":"K35 (D6,C7)", "x":6.25, "y":3},
{"label":"K36 (D6,F0)", "x":7.25, "y":3},
{"label":"K37 (D6,F1)", "x":8.25, "y":3},
{"label":"K38 (D6,F4)", "x":9.25, "y":3},
{"label":"K39 (D6,F5)", "x":10.25, "y":3},
{"label":"K3A (D6,F6)", "x":11.25, "y":3},
{"label":"K3B (D6,F7)", "x":12.25, "y":3, "w":1.75},
{"label":"K3D (D6,B3)", "x":14, "y":3},
{"label":"K3E (D6,B7)", "x":15, "y":3},
{"label":"K40 (D4,D1)", "x":0, "y":4, "w":1.5},
{"label":"K41 (D4,D2)", "x":1.5, "y":4},
{"label":"K42 (D4,D3)", "x":2.5, "y":4, "w":1.5},
{"label":"K45 (D4,C7)", "x":4, "y":4, "w":7},
{"label":"K4A (D4,F6)", "x":11, "y":4, "w":1.5},
{"label":"K4C (D4,B2)", "x":13, "y":4},
{"label":"K4D (D4,B3)", "x":14, "y":4},
{"label":"K4E (D4,B7)", "x":15, "y":4}
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0, "w":2},
{"x":15, "y":0},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":15, "y":1},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":15, "y":2},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":12.25, "y":3, "w":1.75},
{"x":14, "y":3},
{"x":15, "y":3},
{"x":0, "y":4, "w":1.25},
{"x":1.25, "y":4, "w":1.25},
{"x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":6.25},
{"x":10, "y":4, "w":1.25},
{"x":11.25, "y":4, "w":1.25},
{"x":13, "y":4},
{"x":14, "y":4},
{"x":15, "y":4}
]
},
"LAYOUT_65_ansi_blocker_split_bs": {
"layout": [
{"label":"K00", "x":0, "y":0},
{"label":"K01", "x":1, "y":0},
{"label":"K02", "x":2, "y":0},
{"label":"K03", "x":3, "y":0},
{"label":"K04", "x":4, "y":0},
{"label":"K05", "x":5, "y":0},
{"label":"K06", "x":6, "y":0},
{"label":"K07", "x":7, "y":0},
{"label":"K08", "x":8, "y":0},
{"label":"K09", "x":9, "y":0},
{"label":"K0A", "x":10, "y":0},
{"label":"K0B", "x":11, "y":0},
{"label":"K0C", "x":12, "y":0},
{"label":"K0D", "x":13, "y":0},
{"label":"K1D", "x":14, "y":0},
{"label":"K0E", "x":15, "y":0},
{"label":"K10", "x":0, "y":1, "w":1.5},
{"label":"K11", "x":1.5, "y":1},
{"label":"K12", "x":2.5, "y":1},
{"label":"K13", "x":3.5, "y":1},
{"label":"K14", "x":4.5, "y":1},
{"label":"K15", "x":5.5, "y":1},
{"label":"K16", "x":6.5, "y":1},
{"label":"K17", "x":7.5, "y":1},
{"label":"K18", "x":8.5, "y":1},
{"label":"K19", "x":9.5, "y":1},
{"label":"K1A", "x":10.5, "y":1},
{"label":"K1B", "x":11.5, "y":1},
{"label":"K1C", "x":12.5, "y":1},
{"label":"K2D", "x":13.5, "y":1, "w":1.5},
{"label":"K1E", "x":15, "y":1},
{"label":"K20", "x":0, "y":2, "w":1.75},
{"label":"K21", "x":1.75, "y":2},
{"label":"K22", "x":2.75, "y":2},
{"label":"K23", "x":3.75, "y":2},
{"label":"K24", "x":4.75, "y":2},
{"label":"K25", "x":5.75, "y":2},
{"label":"K26", "x":6.75, "y":2},
{"label":"K27", "x":7.75, "y":2},
{"label":"K28", "x":8.75, "y":2},
{"label":"K29", "x":9.75, "y":2},
{"label":"K2A", "x":10.75, "y":2},
{"label":"K2B", "x":11.75, "y":2},
{"label":"K2C", "x":12.75, "y":2, "w":2.25},
{"label":"K2E", "x":15, "y":2},
{"label":"K30", "x":0, "y":3, "w":2.25},
{"label":"K31", "x":2.25, "y":3},
{"label":"K32", "x":3.25, "y":3},
{"label":"K33", "x":4.25, "y":3},
{"label":"K34", "x":5.25, "y":3},
{"label":"K35", "x":6.25, "y":3},
{"label":"K36", "x":7.25, "y":3},
{"label":"K37", "x":8.25, "y":3},
{"label":"K38", "x":9.25, "y":3},
{"label":"K39", "x":10.25, "y":3},
{"label":"K3A", "x":11.25, "y":3},
{"label":"K3B", "x":12.25, "y":3, "w":1.75},
{"label":"K3D", "x":14, "y":3},
{"label":"K3E", "x":15, "y":3},
{"label":"K40", "x":0, "y":4, "w":1.25},
{"label":"K41", "x":1.25, "y":4, "w":1.25},
{"label":"K42", "x":2.5, "y":4, "w":1.25},
{"label":"K45", "x":3.75, "y":4, "w":6.25},
{"label":"K49", "x":10, "y":4, "w":1.25},
{"label":"K4A", "x":11.25, "y":4, "w":1.25},
{"label":"K4C", "x":13, "y":4},
{"label":"K4D", "x":14, "y":4},
{"label":"K4E", "x":15, "y":4}
]
},
"LAYOUT_65_ansi_blocker_tsangan_split_bs": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0},
{"x":14, "y":0},
{"x":15, "y":0},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":15, "y":1},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":15, "y":2},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":12.25, "y":3, "w":1.75},
{"x":14, "y":3},
{"x":15, "y":3},
{"x":0, "y":4, "w":1.5},
{"x":1.5, "y":4},
{"x":2.5, "y":4, "w":1.5},
{"x":4, "y":4, "w":7},
{"x":11, "y":4, "w":1.5},
{"x":13, "y":4},
{"x":14, "y":4},
{"x":15, "y":4}
]
}
}
}
}

View file

@ -19,7 +19,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
[0] = LAYOUT_all(
[0] = LAYOUT_65_ansi_blocker_split_bs(
KC_GESC, 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_BSLS, KC_DEL, KC_PGUP,
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_BSPC, KC_PGDN,
KC_LCTL, 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_HOME,
@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// Fn1 Layer
[1] = LAYOUT_all(
[1] = LAYOUT_65_ansi_blocker_split_bs(
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, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// Fn2 Layer
[2] = LAYOUT_all(
[2] = LAYOUT_65_ansi_blocker_split_bs(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, 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

@ -19,7 +19,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
[0] = LAYOUT_all(
[0] = LAYOUT_65_ansi_blocker_split_bs(
KC_GESC, 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_PGUP,
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_PGDN,
KC_LCTL, 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_HOME,
@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// Fn1 Layer
[1] = LAYOUT_all(
[1] = LAYOUT_65_ansi_blocker_split_bs(
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, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// Fn2 Layer
[2] = LAYOUT_all(
[2] = LAYOUT_65_ansi_blocker_split_bs(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// Fn3 Layer
[3] = LAYOUT_all(
[3] = LAYOUT_65_ansi_blocker_split_bs(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, 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

@ -21,8 +21,8 @@
#define ____ KC_NO
#define LAYOUT_all( \
// LAYOUT_all:
#define LAYOUT_65_ansi_blocker_split_bs( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K113, K014, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K213, K114, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
@ -36,7 +36,7 @@
{K400, K401, K402, ____, ____, K405, ____, ____, ____, K409, K410, ____, K412, K413, K414} \
}
#define LAYOUT_65_7u_split_bs( \
#define LAYOUT_65_ansi_blocker_tsangan_split_bs( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K113, K014, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K213, K114, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
@ -50,7 +50,7 @@
{K400, K401, K402, ____, ____, K405, ____, ____, ____, ____, K410, ____, K412, K413, K414} \
}
#define LAYOUT_65_625u( \
#define LAYOUT_65_ansi_blocker( \
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, K213, K114, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \