1 // This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2 // this is the style you want to emulate.
5 #ifdef BACKLIGHT_ENABLE
9 // Each layer gets a name for readability, which is then used in the keymap matrix below.
10 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
11 // Layer names don't all need to be of the same length, obviously, and you can also skip them
12 // entirely and just use numbers.
19 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [_QW] = { /* Qwerty */
21 /* MIT Layout (QWERTY layer)
23 * ,-----------------------------------------------------------------------.
24 * | esc | q | w | e | r | t | y | u | i | o | p | bspc|
25 * |-----------------------------------------------------------------------|
26 * | tab | a | s | d | f | g | h | j | k | l | ; | ' |
27 * |-----------------------------------------------------------------------|
28 * |shift| z | x | c | v | b | n | m | , | . | / |enter|
29 * |-----------------------------------------------------------------------|
30 * | ctl | alt | win | TK |lower| spc |raise|left |down | up |right|
31 * `-----------------------------------------------------------------------'
33 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
34 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
35 {KC_LSFT, 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) },
36 {KC_LCTL, KC_LALT, KC_LGUI, TG(_TK), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
38 [_CM] = { /* Colemak */
39 /* MIT Layout (Colemak layer)
41 * ,-----------------------------------------------------------------------.
42 * | esc | q | w | f | p | g | j | l | u | y | ; | bspc|
43 * |-----------------------------------------------------------------------|
44 * | tab | a | r | s | t | d | h | n | e | i | o | ' |
45 * |-----------------------------------------------------------------------|
46 * |shift| z | x | c | v | b | k | m | , | . | / |enter|
47 * |-----------------------------------------------------------------------|
48 * | ctl | alt | win | TK |lower| spc |raise|left |down | up |right|
49 * `-----------------------------------------------------------------------'
51 {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
52 {KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
53 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_ENT)},
54 {KC_LCTL, KC_LALT, KC_LGUI, TG(_TK), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
57 /* MIT Layout (RAISE layer)
59 * ,-----------------------------------------------------------------------.
60 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | bspc|
61 * |-----------------------------------------------------------------------|
62 * | tab | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
63 * |-----------------------------------------------------------------------|
64 * |shift| F7 | F8 | F9 | F10 | F11 | F12 | QW | CM | BL | RST |enter|
65 * |-----------------------------------------------------------------------|
66 * | ctl | alt | win | del |lower| spc |raise|next |vold |volu |PLAY |
67 * `-----------------------------------------------------------------------'
70 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
71 {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
72 {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), M(0), RESET, KC_TRNS},
73 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
76 /* MIT Layout (Colemak layer)
78 * ,-----------------------------------------------------------------------.
79 * | esc | q | w | f | p | g | j | l | u | y | ; | bspc|
80 * |-----------------------------------------------------------------------|
81 * | tab | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
82 * |-----------------------------------------------------------------------|
83 * |shift| F7 | F8 | F9 | F10 | F11 | F12 | QW | CM | BL | RST |enter|
84 * |-----------------------------------------------------------------------|
85 * | ctl | alt | win | TK |lower| spc |raise|next |vold |volu |PLAY |
86 * `-----------------------------------------------------------------------'
88 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
89 {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
90 {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), M(0), RESET, KC_TRNS},
91 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
93 [_TK] = { /* Ten Key*/
94 /* MIT Layout (Ten Key layer)
96 * ,-----------------------------------------------------------------------.
97 * | esc | F9 | F10 | F11 | F12 | PGUP| % | / | 7 | 8 | 9 | bspc|
98 * |-----------------------------------------------------------------------|
99 * | tab | F5 | F6 | F7 | F8 | PGDN| HOME| * | 4 | 5 | 6 | \ |
100 * |-----------------------------------------------------------------------|
101 * |shift| F1 | F2 | F3 | F4 | DEL | END | 0 | 1 | 2 | 3 |enter|
102 * |-----------------------------------------------------------------------|
103 * | ctl | alt | win | TK |lower| spc |raise|left |down | up |right|
104 * `-----------------------------------------------------------------------'
106 {KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_PERC, KC_SLSH, KC_7, KC_8, KC_9, KC_BSPC},
107 {KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_HOME, KC_ASTR, KC_4, KC_5, KC_6, KC_PIPE},
108 {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_END, KC_0, KC_1, KC_2, KC_3, KC_TRNS},
109 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
114 const uint16_t PROGMEM fn_actions[] = {
118 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
120 // MACRODOWN only works in this function
123 if (record->event.pressed) {
124 register_code(KC_RSFT);
125 #ifdef BACKLIGHT_ENABLE
129 unregister_code(KC_RSFT);