Orthocode Layout Macro rework (#13995)

* move rotary encoder to top row of layout macro

Makes the layout macro and keycodes resemble the assembled keyboard.

* update info.json data

- convert tabs to spaces
- use human-friendly formatting
- fill in key object labels
- adjust object sequence for layout macro changes
master
James Young 2021-08-14 02:02:24 -07:00 committed by GitHub
parent e2c6dadfbf
commit 90583a1668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 133 additions and 111 deletions

View File

@ -7,78 +7,83 @@
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"layout": [ "layout": [
{"label":"Game", "x":0.5, "y":1},
{"label":"Esc", "x":1.75, "y":1},
{"label":"", "x":3, "y":1},
{"label":"", "x":4, "y":1},
{"label":"", "x":5, "y":1},
{"label":"", "x":6, "y":1},
{"label":"", "x":7, "y":1},
{"label":"", "x":10.5, "y":1},
{"label":"", "x":11.5, "y":1},
{"label":"", "x":12.5, "y":1},
{"label":"", "x":13.5, "y":1},
{"label":"", "x":14.5, "y":1},
{"label":"_", "x":15.5, "y":1},
{"label":"+", "x":16.5, "y":1},
{"label":"Home", "x":17.5, "y":1},
{"label":"M1", "x":0.25, "y":2},
{"label":"Tab", "x":1.5, "y":2, "w":1.5},
{"label":"Q", "x":3, "y":2},
{"label":"W", "x":4, "y":2},
{"label":"E", "x":5, "y":2},
{"label":"R", "x":6, "y":2},
{"label":"T", "x":7, "y":2},
{"label":"Y", "x":10.5, "y":2},
{"label":"U", "x":11.5, "y":2},
{"label":"I", "x":12.5, "y":2},
{"label":"O", "x":13.5, "y":2},
{"label":"P", "x":14.5, "y":2},
{"label":"|", "x":15.5, "y":2, "w":1.5},
{"label":"Delete", "x":17, "y":2},
{"label":"End", "x":18, "y":2},
{"label":"M2", "x":0, "y":3},
{"label":"Ctrl", "x":1.25, "y":3, "w":1.75},
{"label":"A", "x":3, "y":3},
{"label":"S", "x":4, "y":3},
{"label":"D", "x":5, "y":3},
{"label":"F", "x":6, "y":3},
{"label":"G", "x":7, "y":3},
{"label":"H", "x":10.5, "y":3},
{"label":"J", "x":11.5, "y":3},
{"label":"K", "x":12.5, "y":3},
{"label":"L", "x":13.5, "y":3},
{"label":":", "x":14.5, "y":3},
{"label":"\"", "x":15.5, "y":3},
{"label":"Enter", "x":16.5, "y":3, "w":2.25},
{"label":"Rotary", "x":0.5, "y":0}, {"label":"Rotary", "x":0.5, "y":0},
{"label":"Game", "x":0.5, "y":1},
{"label":"Esc", "x":1.75, "y":1},
{"label":"1", "x":3, "y":1},
{"label":"2", "x":4, "y":1},
{"label":"3", "x":5, "y":1},
{"label":"4", "x":6, "y":1},
{"label":"5", "x":7, "y":1},
{"label":"6", "x":10.5, "y":1},
{"label":"7", "x":11.5, "y":1},
{"label":"8", "x":12.5, "y":1},
{"label":"9", "x":13.5, "y":1},
{"label":"0", "x":14.5, "y":1},
{"label":"_", "x":15.5, "y":1},
{"label":"+", "x":16.5, "y":1},
{"label":"Home", "x":17.5, "y":1},
{"label":"M1", "x":0.25, "y":2},
{"label":"Tab", "x":1.5, "y":2, "w":1.5},
{"label":"Q", "x":3, "y":2},
{"label":"W", "x":4, "y":2},
{"label":"E", "x":5, "y":2},
{"label":"R", "x":6, "y":2},
{"label":"T", "x":7, "y":2},
{"label":"Y", "x":10.5, "y":2},
{"label":"U", "x":11.5, "y":2},
{"label":"I", "x":12.5, "y":2},
{"label":"O", "x":13.5, "y":2},
{"label":"P", "x":14.5, "y":2},
{"label":"|", "x":15.5, "y":2, "w":1.5},
{"label":"Delete", "x":17, "y":2},
{"label":"End", "x":18, "y":2},
{"label":"M2", "x":0, "y":3},
{"label":"Ctrl", "x":1.25, "y":3, "w":1.75},
{"label":"A", "x":3, "y":3},
{"label":"S", "x":4, "y":3},
{"label":"D", "x":5, "y":3},
{"label":"F", "x":6, "y":3},
{"label":"G", "x":7, "y":3},
{"label":"H", "x":10.5, "y":3},
{"label":"J", "x":11.5, "y":3},
{"label":"K", "x":12.5, "y":3},
{"label":"L", "x":13.5, "y":3},
{"label":":", "x":14.5, "y":3},
{"label":"\"", "x":15.5, "y":3},
{"label":"Enter", "x":16.5, "y":3, "w":2.25},
{"label":"Layer", "x":0.75, "y":4, "w":2.25}, {"label":"Layer", "x":0.75, "y":4, "w":2.25},
{"label":"Z", "x":3, "y":4}, {"label":"Z", "x":3, "y":4},
{"label":"X", "x":4, "y":4}, {"label":"X", "x":4, "y":4},
{"label":"C", "x":5, "y":4}, {"label":"C", "x":5, "y":4},
{"label":"V", "x":6, "y":4}, {"label":"V", "x":6, "y":4},
{"label":"B", "x":7, "y":4}, {"label":"B", "x":7, "y":4},
{"label":"N", "x":10.5, "y":4}, {"label":"N", "x":10.5, "y":4},
{"label":"M", "x":11.5, "y":4}, {"label":"M", "x":11.5, "y":4},
{"label":"<", "x":12.5, "y":4}, {"label":"<", "x":12.5, "y":4},
{"label":">", "x":13.5, "y":4}, {"label":">", "x":13.5, "y":4},
{"label":"?", "x":14.5, "y":4}, {"label":"?", "x":14.5, "y":4},
{"label":"\u2191", "x":17, "y":4}, {"label":"\u2191", "x":17, "y":4},
{"label":"Ctrl", "x":1.25, "y":5, "w":1.25},
{"label":"Win", "x":2.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":1.25, "y":5, "w":1.25},
{"label":"Alt", "x":3.75, "y":5, "w":1.25}, {"label":"Win", "x":2.5, "y":5, "w":1.25},
{"label":"Fn", "x":5.5, "y":5, "w":1.25}, {"label":"Alt", "x":3.75, "y":5, "w":1.25},
{"label":"th1", "x":6.75, "y":5, "h":2.75}, {"label":"Fn", "x":5.5, "y":5, "w":1.25},
{"label":"th2", "x":7.75, "y":5.25, "h":2.25}, {"label":"th1", "x":6.75, "y":5, "h":2.75},
{"label":"th3", "x":9.75, "y":5.25, "h":2.25}, {"label":"th2", "x":7.75, "y":5.25, "h":2.25},
{"label":"th4", "x":10.75, "y":5, "h":2.75}, {"label":"th3", "x":9.75, "y":5.25, "h":2.25},
{"label":"Fn", "x":11.75, "y":5, "w":1.25}, {"label":"th4", "x":10.75, "y":5, "h":2.75},
{"label":"Alt", "x":13, "y":5, "w":1.25}, {"label":"Fn", "x":11.75, "y":5, "w":1.25},
{"label":"Ctrl", "x":14.25, "y":5, "w":1.25}, {"label":"Alt", "x":13, "y":5, "w":1.25},
{"label":"\u2190", "x":16, "y":5}, {"label":"Ctrl", "x":14.25, "y":5, "w":1.25},
{"label":"\u2193", "x":17, "y":5}, {"label":"\u2190", "x":16, "y":5},
{"label":"\u2192", "x":18, "y":5}] {"label":"\u2193", "x":17, "y":5},
{"label":"\u2192", "x":18, "y":5}
]
} }
} }
} }

View File

@ -27,47 +27,63 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( [0] = LAYOUT(
TG(2), 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_HOME, /* Rotary */
RGB_TOG, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_DEL, KC_END, KC__MUTE,
RGB_MOD, 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, /* esc 1 2 3 4 5 6 7 8 9 0 - = home */
KC__MUTE, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, TG(2), 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_HOME,
KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_RSFT, KC_ENT, KC_BSPC, KC_SHSP, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), /* tab Q W E R T Y U I O P \ delete end */
RGB_TOG, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_DEL, KC_END,
[1] = LAYOUT( /* caps A S D F G H J K L ; ' enter */
/* esc 1 2 3 4 5 6 7 8 9 0 - = home */ RGB_MOD, 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,
TG(3), KC_GRV, 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, /* shift Z X C V B N M , . / up */
/* tab Q W E R T Y U I O P \ delete end */ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, /* ctrl win alt fn th1 th2 th3 th4 fn alt ctrl left down right */
/* caps A S D F G H J K L ; ' enter */ KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_RSFT, KC_ENT, KC_BSPC, KC_SHSP, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, ),
/* shift Z X C V B N M , . / up */ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_EQL, LSFT(KC_EQL), LSFT(KC_9), LSFT(KC_0), KC_TRNS, KC_VOLU, /* Rotary */
/* ctrl win alt fn th1 th2 th3 th4 fn alt ctrl left down right*/ KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS), /* esc 1 2 3 4 5 6 7 8 9 0 - = home */
[2] = LAYOUT( TG(3), KC_GRV, 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,
/* esc 1 2 3 4 5 6 7 8 9 0 - = home */ /* tab Q W E R T Y U I O P \ delete end */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS,
/* tab Q W E R T Y U I O P \ delete end */ /* caps A S D F G H J K L ; ' enter */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS,
/* caps A S D F G H J K L ; ' enter */ /* shift Z X C V B N M , . / up */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQL, LSFT(KC_EQL), LSFT(KC_9), LSFT(KC_0), KC_TRNS, KC_VOLU,
/* Rotary shift Z X C V B N M , . / up */ /* ctrl win alt fn th1 th2 th3 th4 fn alt ctrl left down right */
KC_TRNS, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS
/* ctrl win alt fn th1 th2 th3 th4 fn alt ctrl left down right*/ ),
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [2] = LAYOUT(
[3] = LAYOUT( /* Rotary */
/* esc 1 2 3 4 5 6 7 8 9 0 - = home */ KC_TRNS,
TG(3), KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, /* esc 1 2 3 4 5 6 7 8 9 0 - = home */
/* tab Q W E R T Y U I O P \ delete end */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, /* tab Q W E R T Y U I O P \ delete end */
/* caps A S D F G H J K L ; ' enter */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS,
KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, /* caps A S D F G H J K L ; ' enter */
/* Rotary shift Z X C V B N M , . / up */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS,
KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, /* shift Z X C V B N M , . / up */
/* ctrl win alt fn th1 th2 th3 th4 fn alt ctrl left down right*/ KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_FROG, KC_FROG, KC_FROG, MO(1), KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG), /* ctrl win alt fn th1 th2 th3 th4 fn alt ctrl left down right */
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[3] = LAYOUT(
/* Rotary */
KC_FROG,
/* esc 1 2 3 4 5 6 7 8 9 0 - = home */
TG(3), KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG,
/* tab Q W E R T Y U I O P \ delete end */
KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG,
/* caps A S D F G H J K L ; ' enter */
KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG,
/* shift Z X C V B N M , . / up */
KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG,
/* ctrl win alt fn th1 th2 th3 th4 fn alt ctrl left down right */
KC_FROG, KC_FROG, KC_FROG, MO(1), KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG, KC_FROG
)
}; };

View File

@ -21,10 +21,11 @@
#include "quantum.h" #include "quantum.h"
#define LAYOUT( \ #define LAYOUT( \
K30, \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \
) { \ ) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \