Skip to content

Commit

Permalink
Ergotravel refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
noroadsleft committed Jun 13, 2018
1 parent 5be5381 commit 6b28e88
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 68 deletions.
16 changes: 8 additions & 8 deletions keyboards/ergotravel/ergotravel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

// Used to create a keymap using only KC_ prefixed keys
#define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05,L06, R00, R01, R02, R03, R04, R05, R06, \
L10, L11, L12, L13, L14, L15,L16, R10, R11, R12, R13, R14, R15, R16,\
L20, L21, L22, L23, L24, L25,L26, R20, R21, R22, R23, R24, R25, R26,\
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \
LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
)

#endif
98 changes: 42 additions & 56 deletions keyboards/ergotravel/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,77 +14,63 @@ enum custom_keycodes {
ADJUST,
};

#define KC_ KC_TRNS
// #define KC_ KC_TRNS
#define _______ KC_TRNS

#define KC_LOWR LOWER
#define KC_RASE RAISE
#define KC_ADJT ADJUST
#define KC_RST RESET
#define KC_BL_S BL_STEP
#define KC_DBUG DEBUG
#define KC_RTOG RGB_TOG
#define KC_RMOD RGB_MOD
#define KC_RHUI RGB_HUI
#define KC_RHUD RGB_HUD
#define KC_RSAI RGB_SAI
#define KC_RSAD RGB_SAD
#define KC_RVAI RGB_VAI
#define KC_RVAD RGB_VAD

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_QWERTY] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
ESC , Q , W , E , R , T ,LBRC, RBRC, Y , U , I , O , P ,BSPC,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
TAB , A , S , D , F , G , A, A, H , J , K , L ,SCLN,QUOT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
[_QWERTY] = LAYOUT(
//,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_A, KC_A, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
//`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
),

[_LOWER] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
GRAVE, 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,DEL,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
TAB , F1 , F2 , F3 , F4 , F5 , F6 , D, Y ,MINS, EQL,LBRC,RBRC,BSLS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
LSFT, F7 , F8 , F9 , F10, F11, F12, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
[_LOWER] = LAYOUT(
//,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_A, KC_B, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_D, KC_Y, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
//`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
),

[_RAISE] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
ESC , 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,BSPC,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
[_RAISE] = LAYOUT(
//,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_A, KC_B, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_C, KC_D, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
//`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
),

[_ADJUST] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
ESC , F1 , F2 , F3 , F4 , F5 , F6, F7, F8, F9 ,F10 , F11, F12,BSPC,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
[_ADJUST] = LAYOUT(
//,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
KC_ESC, 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_BSPC,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_C, KC_D, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
//`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
)

};





Expand Down
8 changes: 4 additions & 4 deletions keyboards/ergotravel/rev1/rev1.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
//void promicro_bootloader_jmp(bool program);

#define LAYOUT( \
L00, L01, L02, L03, L04, L05,L06, R00, R01, R02, R03, R04, R05,R06, \
L10, L11, L12, L13, L14, L15,L16, R10, R11, R12, R13, R14, R15,R16, \
L20, L21, L22, L23, L24, L25,L26, R20, R21, R22, R23, R24, R25,R26, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06 }, \
Expand Down

0 comments on commit 6b28e88

Please sign in to comment.