Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portal 66 Layout Macro Refactor #15255

Merged
merged 13 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions keyboards/portal_66/hotswap/hotswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,32 @@

#include "quantum.h"

#define LAYOUT( \
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \
k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \
k400, k401, k402, k406, k409, k411, k412, k413, k415 \
#define XXX KC_NO

/*
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0E │0F │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
* │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1F │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
* │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │2F │
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
* │30 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3F │
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
* │40 │41 │42 │46 │49 │4B │ │4C │4D │4F │
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
*/

#define LAYOUT_65_ansi_blocker( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
k40, k41, k42, k46, k49, k4B, k4C, k4D, k4F \
) { \
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \
{ k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \
{ k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E, k0F }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX, k2F }, \
{ k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \
{ k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX, k4B, k4C, k4D, XXX, k4F } \
}
5 changes: 4 additions & 1 deletion keyboards/portal_66/hotswap/info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"keyboard_name": "Portal 66 Hotswap",
"maintainer": "matthewdias",
"layout_aliases": {
"LAYOUT": "LAYOUT_65_ansi_blocker"
},
"layouts": {
"LAYOUT": {
"LAYOUT_65_ansi_blocker": {
"layout": [
{ "x":0, "y":0 },
{ "x":1, "y":0 },
Expand Down
4 changes: 2 additions & 2 deletions keyboards/portal_66/hotswap/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ enum layer_names {
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
[_BASE] = LAYOUT_65_ansi_blocker(
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_HOME,
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_END,
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_PGUP,
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, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
),
[_FN] = LAYOUT(
[_FN] = LAYOUT_65_ansi_blocker(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
8 changes: 4 additions & 4 deletions keyboards/portal_66/hotswap/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ enum layer_names {
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_L0] = LAYOUT(
[_L0] = LAYOUT_65_ansi_blocker(
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_HOME,
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_END,
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_PGUP,
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, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_L1), KC_LEFT, KC_DOWN, KC_RGHT
),
[_L1] = LAYOUT(
[_L1] = LAYOUT_65_ansi_blocker(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_L2] = LAYOUT(
[_L2] = LAYOUT_65_ansi_blocker(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_L3] = LAYOUT(
[_L3] = LAYOUT_65_ansi_blocker(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
2 changes: 2 additions & 0 deletions keyboards/portal_66/hotswap/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

LAYOUTS = 65_ansi_blocker
167 changes: 163 additions & 4 deletions keyboards/portal_66/soldered/info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"keyboard_name": "Portal 66",
"maintainer": "matthewdias",
"layout_aliases": {
"LAYOUT_65_ansi_split_bs": "LAYOUT_65_ansi_blocker_split_bs",
"LAYOUT_65_ansi": "LAYOUT_65_ansi_blocker",
"LAYOUT_65_tsangan_split_bs": "LAYOUT_65_ansi_blocker_tsangan_split_bs",
"LAYOUT_65_iso": "LAYOUT_65_iso_blocker"
},
"layouts": {
"LAYOUT_65_ansi_split_bs": {
"LAYOUT_65_ansi_blocker_split_bs": {
"layout": [
{ "x":0, "y":0 },
{ "x":1, "y":0 },
Expand Down Expand Up @@ -78,7 +84,7 @@
{ "x":15, "y":4 }
]
},
"LAYOUT_65_ansi": {
"LAYOUT_65_ansi_blocker": {
"layout": [
{ "x":0, "y":0 },
{ "x":1, "y":0 },
Expand Down Expand Up @@ -153,7 +159,7 @@
{ "x":15, "y":4 }
]
},
"LAYOUT_65_tsangan_split_bs": {
"LAYOUT_65_ansi_blocker_tsangan_split_bs": {
"layout": [
{ "x":0, "y":0 },
{ "x":1, "y":0 },
Expand Down Expand Up @@ -228,7 +234,84 @@
{ "x":15, "y":4 }
]
},
"LAYOUT_65_iso": {
"LAYOUT_65_iso_blocker_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":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 },
{ "x":13.75, "y":1, "w":1.25, "h":2 },
{ "x":15, "y":2 },

{ "x":0, "y":3, "w":1.25 },
{ "x":1.25, "y":3 },
{ "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_iso_blocker": {
"layout": [
{ "x":0, "y":0 },
{ "x":1, "y":0 },
Expand Down Expand Up @@ -303,6 +386,82 @@
{ "x":14, "y":4 },
{ "x":15, "y":4 }
]
},
"LAYOUT_65_iso_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":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 },
{ "x":13.75, "y":1, "w":1.25, "h":2 },
{ "x":15, "y":2 },

{ "x":0, "y":3, "w":1.25 },
{ "x":1.25, "y":3 },
{ "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, "w":1 },
{ "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 }
]
}
}
}
4 changes: 2 additions & 2 deletions keyboards/portal_66/soldered/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ enum layer_names {
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_65_ansi_split_bs(
[_BASE] = LAYOUT_65_ansi_blocker_split_bs(
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_GRV, KC_BSPC, KC_HOME,
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_END,
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_PGUP,
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, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
),
[_FN] = LAYOUT_65_ansi_split_bs(
[_FN] = LAYOUT_65_ansi_blocker_split_bs(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
Loading