aboutsummaryrefslogtreecommitdiff
path: root/keyboards/mitosis/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/mitosis/keymaps/default/keymap.c')
-rw-r--r--keyboards/mitosis/keymaps/default/keymap.c87
1 files changed, 44 insertions, 43 deletions
diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c
index 320d33db6..99f57c55f 100644
--- a/keyboards/mitosis/keymaps/default/keymap.c
+++ b/keyboards/mitosis/keymaps/default/keymap.c
@@ -1,7 +1,7 @@
1// this is the style you want to emulate. 1// this is the style you want to emulate.
2// This is the canonical layout file for the Quantum project. If you want to add another keyboard, 2// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
3 3
4#include "mitosis.h" 4#include QMK_KEYBOARD_H
5 5
6// Each layer gets a name for readability, which is then used in the keymap matrix below. 6// Each layer gets a name for readability, which is then used in the keymap matrix below.
7// The underscores don't mean anything - you can have a layer called STUFF or any other name. 7// The underscores don't mean anything - you can have a layer called STUFF or any other name.
@@ -15,7 +15,7 @@ enum mitosis_layers
15 _FUNCSHIFT 15 _FUNCSHIFT
16}; 16};
17 17
18enum mitosis_keycodes 18enum mitosis_keycodes
19{ 19{
20 FNKEY = SAFE_RANGE, 20 FNKEY = SAFE_RANGE,
21 SHIFT 21 SHIFT
@@ -38,44 +38,45 @@ enum mitosis_macros
38#define XXXXXXX KC_NO 38#define XXXXXXX KC_NO
39 39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41[_MALT] = { /* Malt Layout, customised for reduced columns (ex: quote and shift locations) */ 41
42 {KC_Q, KC_P, KC_Y, KC_C, KC_B, KC_V, KC_M, KC_U, KC_Z, KC_L }, 42 [_MALT] = LAYOUT( /* Malt Layout, customised for reduced columns (ex: quote and shift locations) */
43 {KC_A, KC_N, KC_I, KC_S, KC_F, KC_D, KC_T, KC_H, KC_O, KC_R }, 43 KC_Q, KC_P, KC_Y, KC_C, KC_B, KC_V, KC_M, KC_U, KC_Z, KC_L,
44 {KC_COMM, KC_DOT, KC_J, KC_G, KC_SLSH, KC_SCLN, KC_W, KC_K, KC_QUOT, KC_X }, 44 KC_A, KC_N, KC_I, KC_S, KC_F, KC_D, KC_T, KC_H, KC_O, KC_R,
45 {XXXXXXX, M(VOLU), M(ESCM), KC_TAB, KC_LCTL, KC_LALT, KC_ENT, KC_DEL, KC_PGUP, XXXXXXX }, 45 KC_COMM, KC_DOT, KC_J, KC_G, KC_SLSH, KC_SCLN, KC_W, KC_K, KC_QUOT, KC_X,
46 {XXXXXXX, M(VOLD), KC_LGUI, KC_E, FNKEY, SHIFT, KC_SPC, KC_BSPC, KC_PGDN, XXXXXXX } 46 M(VOLU), M(ESCM), KC_TAB, KC_LCTL, KC_LALT, KC_ENT, KC_DEL, KC_PGUP,
47}, 47 M(VOLD), KC_LGUI, KC_E, FNKEY, SHIFT, KC_SPC, KC_BSPC, KC_PGDN
48 48 ),
49 49
50[_SHIFTED] = { /* Shifted Layer, layered so that tri_layer can be used, or selectively 50
51 able to modify individual key's shifted behaviour */ 51 [_SHIFTED] = LAYOUT( /* Shifted Layer, layered so that tri_layer can be used, or selectively
52 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, 52 able to modify individual key's shifted behaviour */
53 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, 53 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
54 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, 54 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
55 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX }, 55 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
56 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX } 56 _______, _______, _______, _______, _______, _______, _______, _______,
57}, 57 _______, _______, _______, _______, _______, _______, _______, _______
58 58 ),
59 59
60 60
61[_FUNCTION] = { /* Function Layer, primary alternative layer featuring numpad on right hand, 61
62 cursor keys on left hand, and all symbols*/ 62 [_FUNCTION] = LAYOUT( /* Function Layer, primary alternative layer featuring numpad on right hand,
63 {KC_AMPR, KC_PERC, KC_UP, KC_CIRC, KC_PIPE, KC_LBRC, KC_7, KC_8, KC_9, KC_MINS }, 63 cursor keys on left hand, and all symbols*/
64 {KC_AT, KC_LEFT, KC_DOWN, KC_RGHT, KC_HASH, KC_LPRN, KC_4, KC_5, KC_6, KC_PLUS }, 64 KC_AMPR, KC_PERC, KC_UP, KC_CIRC, KC_PIPE, KC_LBRC, KC_7, KC_8, KC_9, KC_MINS,
65 {KC_ASTR, KC_UNDS, KC_EXLM, KC_DLR, KC_BSLS, KC_LCBR, KC_1, KC_2, KC_3, KC_ENT }, 65 KC_AT, KC_LEFT, KC_DOWN, KC_RGHT, KC_HASH, KC_LPRN, KC_4, KC_5, KC_6, KC_PLUS,
66 {XXXXXXX, KC_HOME, KC_GRV, KC_PWR, _______, _______, KC_EQL, KC_TILD, KC_DOT, XXXXXXX }, 66 KC_ASTR, KC_UNDS, KC_EXLM, KC_DLR, KC_BSLS, KC_LCBR, KC_1, KC_2, KC_3, KC_ENT,
67 {XXXXXXX, KC_END, _______, _______, _______, _______, KC_0, _______, KC_PSCR, XXXXXXX } 67 KC_HOME, KC_GRV, KC_PWR, _______, _______, KC_EQL, KC_TILD, KC_DOT,
68}, 68 KC_END, _______, _______, _______, _______, KC_0, _______, KC_PSCR
69 69 ),
70 70
71[_FUNCSHIFT] = { /* Function Shifted Layer, secondary alternative layer with closing brackets, 71
72 and F-keys under their numpad equivalents*/ 72 [_FUNCSHIFT] = LAYOUT( /* Function Shifted Layer, secondary alternative layer with closing brackets,
73 {_______, _______, _______, _______, _______, KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10 }, 73 and F-keys under their numpad equivalents*/
74 {_______, _______, _______, _______, _______, KC_RPRN, KC_F4, KC_F5, KC_F6, KC_F11 }, 74 _______, _______, _______, _______, _______, KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10,
75 {_______, _______, _______, _______, _______, KC_RCBR, KC_F1, KC_F2, KC_F3, KC_F12 }, 75 _______, _______, _______, _______, _______, KC_RPRN, KC_F4, KC_F5, KC_F6, KC_F11,
76 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX }, 76 _______, _______, _______, _______, _______, KC_RCBR, KC_F1, KC_F2, KC_F3, KC_F12,
77 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX } 77 _______, _______, _______, _______, _______, _______, _______, _______,
78} 78 _______, _______, _______, _______, _______, _______, _______, _______
79 )
79 80
80}; 81};
81 82
@@ -128,7 +129,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
128 return MACRO(T(ESC), END); 129 return MACRO(T(ESC), END);
129 } 130 }
130 } 131 }
131 break; 132 break;
132 133
133 break; 134 break;
134 } 135 }
@@ -183,7 +184,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
183 184
184 //FUNCSHIFT has been shifted by the SHIFT handling, some keys need to be excluded 185 //FUNCSHIFT has been shifted by the SHIFT handling, some keys need to be excluded
185 if (layer == _FUNCSHIFT) { 186 if (layer == _FUNCSHIFT) {
186 //F1-F12 should be sent as unshifted keycodes, 187 //F1-F12 should be sent as unshifted keycodes,
187 //and ] needs to be unshifted or it is sent as } 188 //and ] needs to be unshifted or it is sent as }
188 if ( (keycode >= KC_F1 && keycode <= KC_F12) 189 if ( (keycode >= KC_F1 && keycode <= KC_F12)
189 || keycode == KC_RBRC ) { 190 || keycode == KC_RBRC ) {
@@ -200,7 +201,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
200 201
201void matrix_scan_user(void) { 202void matrix_scan_user(void) {
202 uint8_t layer = biton32(layer_state); 203 uint8_t layer = biton32(layer_state);
203 204
204 switch (layer) { 205 switch (layer) {
205 case _MALT: 206 case _MALT:
206 set_led_off; 207 set_led_off;