#define _QW 0
#define _LW 1
#define _RS 2
#define _SH 3
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Defalt Layout
/*
* ,-----------------------------------------------------------------------.
* |ESC |Q |W |E |R |T |Y |U |U |O |P |BSPC |
* |-----------------------------------------------------------------------|
* |TAB |A |S |D |F |G |H |J |K |L |SCLN |QUOT |
* |-----------------------------------------------------------------------|
* |LSFT |Z |X |C |V |B |N |M |COMM |DOT .|SLSH |ENT/RS|
* |-----------------------------------------------------------------------|
* |M0 |LCTL |LALT |LGUI |FNLW |SPC |FNRS |LEFT |UP |DOWN |RGHT |
* `-----------------------------------------------------------------------'
*/
[_QW] = { /* Qwerty */
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, 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_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{MT(MOD_LSFT, KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_ENT) },
{M(0), KC_LCTL, MT(MOD_LALT, KC_CAPS), KC_LGUI, MO(_LW), LT(_SH, KC_SPC), LT(_SH, KC_SPC), MO(_RS), KC_LEFT, KC_UP , KC_DOWN, KC_RGHT}
},
// RAISE
/*
* ,-----------------------------------------------------------------------.
* |GRV |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |BSPC |
* |-----------------------------------------------------------------------|
* |TAB |A |S |D |HOME |G |H |4 |5 |6 |MINS |BSLS |
* |-----------------------------------------------------------------------|
* |LSFT |Z |X |C |END |B |N |1 |2 |3 |SLSH |ENT/RS|
* |-----------------------------------------------------------------------|
* |M0 |LCTL |LALT |LGUI |FNLW |SPC |0 |0 |. |DOWN |RGHT |
* `-----------------------------------------------------------------------'
*/
[_LW] = { /* LOWER */
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6 , KC_MINS, KC_BSLS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3 , KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_0, KC_DOT , KC_TRNS, KC_TRNS}
},
// LOWER
/*
* ,-----------------------------------------------------------------------.
* |GRV |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |DEL |
* |-----------------------------------------------------------------------|
* |TAB |MUTE |VOLD |VOLU |HOME |G |H |J |BSLS |= |- |" |
* |-----------------------------------------------------------------------|
* |LSFT |MPRV |MPLY |MNXT |END |B |N |F13 |BSLS |[ |] |RSFT |
* |-----------------------------------------------------------------------|
* |M0 |LCTL |LALT |LGUI |FNLW |SPC |FNRS |LEFT |UP |DOWN |RGHT |
* `-----------------------------------------------------------------------'
*/
[_RS] = { /* RAISE */
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
{KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_EQL, KC_MINS, KC_QUOT},
{KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, KC_TRNS, KC_TRNS, KC_F13, KC_BSLS, KC_LBRC, KC_RBRC, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT}
},
// Space FN
/*
* ,-----------------------------------------------------------------------.
* |~ |! |@ |# |$ |% |^ |& |* |( |) |DEL |
* |-----------------------------------------------------------------------|
* |TAB |A |S |D |F |G |H |J |PIPE |+ |_ |QUOT |
* |-----------------------------------------------------------------------|
* |LSFT |Z |X |C |V |B |N |M | |DOT .|SLSH |RSFT |
* |-----------------------------------------------------------------------|
* |M0 |LCTL |LALT |LGUI |FNLW |SPC |FNRS |LEFT |UP |DOWN |RGHT |
* `-----------------------------------------------------------------------'
*/
[_SH] = { /* SpaceFN/Shifted Layout */
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
{KC_TAB, KC_A, KC_S, KC_D, KC_HOME, KC_G, KC_H, KC_J, KC_PIPE, KC_PLUS, KC_UNDS, KC_TRNS},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_END, KC_B, KC_N, KC_M, KC_PIPE, KC_DOT, KC_SLSH, KC_TRNS },
{M(0), KC_LCTL, KC_TRNS, KC_LGUI, MO(_LW), KC_TRNS, KC_TRNS, MO(_RS), KC_LEFT, KC_UP, KC_DOWN, KC_RGHT}
},
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
backlight_step();
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};