Skip to content

Commit

Permalink
Layout macro refactor
Browse files Browse the repository at this point in the history
- Renamed KC_KEYMAP to LAYOUT_kc
- Renamed KEYMAP to LAYOUT
- moved LAYOUT above LAYOUT_kc (Hoping this encourages users to use LAYOUT.)
- updated layout macro name in info.json
- white space changes for readability
  • Loading branch information
noroadsleft committed Dec 15, 2018
1 parent 4f1f52b commit 8ab1cfe
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 247 deletions.
33 changes: 17 additions & 16 deletions keyboards/chimera_ortho/chimera_ortho.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,32 @@
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define KC_KEYMAP( \
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \
k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44,\
k45, k46, k47, k48 \
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44, \
k45, k46, k47, k48 \
) \
{ \
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12 }, \
{ KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26 }, \
{ KC_##k29, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43 }, \
{ KC_NO, KC_##k06, KC_##k20, KC_##k35, KC_##k46, KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO }, \
{ KC_NO, KC_##k28, KC_##k14, KC_##k00, KC_##k45, KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO }, \
{ k01, k02, k03, k04, k05, k08, k09, k10, k11, k12 }, \
{ k15, k16, k17, k18, k19, k22, k23, k24, k25, k26 }, \
{ k29, k31, k32, k33, k34, k37, k38, k41, k42, k43 }, \
{ KC_NO, k06, k20, k35, k46, k47, k36, k21, k07, KC_NO }, \
{ KC_NO, k28, k14, k00, k45, k48, k13, k27, k44, KC_NO } \
}

#define KEYMAP( \
#define LAYOUT_kc( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \
k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44,\
k45, k46, k47, k48 \
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44, \
k45, k46, k47, k48 \
) \
{ \
{ k01, k02, k03, k04, k05, k08, k09, k10, k11, k12 }, \
{ k15, k16, k17, k18, k19, k22, k23, k24, k25, k26 }, \
{ k29, k31, k32, k33, k34, k37, k38, k41, k42, k43 }, \
{ KC_NO, k06, k20, k35, k46, k47, k36, k21, k07, KC_NO }, \
{ KC_NO, k28, k14, k00, k45, k48, k13, k27, k44, KC_NO }, \
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12 }, \
{ KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26 }, \
{ KC_##k29, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43 }, \
{ KC_NO, KC_##k06, KC_##k20, KC_##k35, KC_##k46, KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO }, \
{ KC_NO, KC_##k28, KC_##k14, KC_##k00, KC_##k45, KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO } \
}

#endif
280 changes: 49 additions & 231 deletions keyboards/chimera_ortho/info.json
Original file line number Diff line number Diff line change
@@ -1,240 +1,58 @@
{
"keyboard_name": "Chimera Ortho",
"keyboard_folder": "chimera_ortho",
"maintainer": "qmk",
"width": 15.5,
"height": 4.25,
"layouts": {
"KEYMAP": {
"LAYOUT": {
"layout": [
{
"label": "Esc",
"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": "{",
"x": 6,
"y": 0
},
{
"label": "}",
"x": 8.5,
"y": 0
},
{
"label": "Y",
"x": 9.5,
"y": 0
},
{
"label": "U",
"x": 10.5,
"y": 0
},
{
"label": "I",
"x": 11.5,
"y": 0
},
{
"label": "O",
"x": 12.5,
"y": 0
},
{
"label": "P",
"x": 13.5,
"y": 0
},
{
"label": "\"",
"x": 14.5,
"y": 0
},
{
"label": "Tab",
"x": 0,
"y": 1
},
{
"label": "A",
"x": 1,
"y": 1
},
{
"label": "S",
"x": 2,
"y": 1
},
{
"label": "D",
"x": 3,
"y": 1
},
{
"label": "F",
"x": 4,
"y": 1
},
{
"label": "G",
"x": 5,
"y": 1
},
{
"label": "-",
"x": 6,
"y": 1
},
{
"label": "1",
"x": 8.5,
"y": 1
},
{
"label": "H",
"x": 9.5,
"y": 1
},
{
"label": "J",
"x": 10.5,
"y": 1
},
{
"label": "K",
"x": 11.5,
"y": 1
},
{
"label": "L",
"x": 12.5,
"y": 1
},
{
"label": ";",
"x": 13.5,
"y": 1
},
{
"label": "Enter",
"x": 14.5,
"y": 1
},
{
"label": "(",
"x": 0,
"y": 2
},
{
"label": "Z",
"x": 1,
"y": 2
},
{
"label": "X",
"x": 2,
"y": 2
},
{
"label": "C",
"x": 3,
"y": 2
},
{
"label": "V",
"x": 4,
"y": 2
},
{
"label": "B",
"x": 5,
"y": 2
},
{
"label": "=",
"x": 6,
"y": 2
},
{
"label": "8",
"x": 8.5,
"y": 2
},
{
"label": "N",
"x": 9.5,
"y": 2
},
{
"label": "M",
"x": 10.5,
"y": 2
},
{
"label": ",",
"x": 11.5,
"y": 2
},
{
"label": ".",
"x": 12.5,
"y": 2
},
{
"label": "/",
"x": 13.5,
"y": 2
},
{
"label": ")",
"x": 14.5,
"y": 2
},
{
"label": "Num Layer",
"x": 4,
"y": 3.25
},
{
"label": "Back Space",
"x": 5,
"y": 3.25
},
{
"label": "Space",
"x": 9.5,
"y": 3.25
},
{
"label": "Symbol Layer",
"x": 10.5,
"y": 3.25
}
{"label": "Esc", "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": "{", "x": 6, "y": 0},
{"label": "}", "x": 8.5, "y": 0},
{"label": "Y", "x": 9.5, "y": 0},
{"label": "U", "x": 10.5, "y": 0},
{"label": "I", "x": 11.5, "y": 0},
{"label": "O", "x": 12.5, "y": 0},
{"label": "P", "x": 13.5, "y": 0},
{"label": "\"", "x": 14.5, "y": 0},
{"label": "Tab", "x": 0, "y": 1},
{"label": "A", "x": 1, "y": 1},
{"label": "S", "x": 2, "y": 1},
{"label": "D", "x": 3, "y": 1},
{"label": "F", "x": 4, "y": 1},
{"label": "G", "x": 5, "y": 1},
{"label": "-", "x": 6, "y": 1},
{"label": "1", "x": 8.5, "y": 1},
{"label": "H", "x": 9.5, "y": 1},
{"label": "J", "x": 10.5, "y": 1},
{"label": "K", "x": 11.5, "y": 1},
{"label": "L", "x": 12.5, "y": 1},
{"label": ";", "x": 13.5, "y": 1},
{"label": "Enter", "x": 14.5, "y": 1},
{"label": "(", "x": 0, "y": 2},
{"label": "Z", "x": 1, "y": 2},
{"label": "X", "x": 2, "y": 2},
{"label": "C", "x": 3, "y": 2},
{"label": "V", "x": 4, "y": 2},
{"label": "B", "x": 5, "y": 2},
{"label": "=", "x": 6, "y": 2},
{"label": "8", "x": 8.5, "y": 2},
{"label": "N", "x": 9.5, "y": 2},
{"label": "M", "x": 10.5, "y": 2},
{"label": ", ", "x": 11.5, "y": 2},
{"label": ".", "x": 12.5, "y": 2},
{"label": "/", "x": 13.5, "y": 2},
{"label": ")", "x": 14.5, "y": 2},
{"label": "Num Layer", "x": 4, "y": 3.25},
{"label": "Back Space", "x": 5, "y": 3.25},
{"label": "Space", "x": 9.5, "y": 3.25},
{"label": "Symbol Layer", "x": 10.5, "y": 3.25}
]
}
}
Expand Down

0 comments on commit 8ab1cfe

Please sign in to comment.