From 585f753ffee5b81c5c7262d1d288d95342e28cd6 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 30 Jun 2018 19:42:06 -0700 Subject: Mitosis refactor and Configurator support (#3271) * Matrix refactor * Configurator support * Keymap refactor --- keyboards/mitosis/keymaps/carvac_dv/keymap.c | 163 +++++++++++++-------------- 1 file changed, 80 insertions(+), 83 deletions(-) (limited to 'keyboards/mitosis/keymaps/carvac_dv') diff --git a/keyboards/mitosis/keymaps/carvac_dv/keymap.c b/keyboards/mitosis/keymaps/carvac_dv/keymap.c index 81b559a46b..d97cb600ee 100644 --- a/keyboards/mitosis/keymaps/carvac_dv/keymap.c +++ b/keyboards/mitosis/keymaps/carvac_dv/keymap.c @@ -3,7 +3,7 @@ // number layer with all the numbers on the home row, and a function layer // that provides mouse keys among other things. -#include "mitosis.h" +#include QMK_KEYBOARD_H enum mitosis_layers { @@ -27,93 +27,90 @@ enum mitosis_layers const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - * .--------------------------------------------..--------------------------------------------. - * | Q | W | E | R | T || Y | U | I | O | P | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | A | S | D | F | G || J | H | K | L | ; | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | Z | X | C | V | B || N | M | , | . | / | - * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' - * | PGUP | TAB | LCTRL | SPACE || LSHIFT | ENTER | UP | PSCR | - * |--------+--------+--------+--------||--------+--------+--------+--------| - * | PGDN | LGUI | LALT | FN || NUM | LEFT | DOWN | RIGHT | - * '-----------------------------------''-----------------------------------' - */ - -[_STD] = { /* Standard; as compatible with dvorak and qwerty as possible */ - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, - {XXXXXXX, KC_PGUP, KC_TAB, KC_LCTL, KC_SPC, KC_LSFT, KC_ENT, KC_UP, KC_PSCR, XXXXXXX }, - {XXXXXXX, KC_PGDN, KC_LGUI, KC_LALT, MO(_FN), MO(_NUM), KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX } -}, - -/* Number layout, for data entry and programming purposes (Dvorak result in parens) - * .--------------------------------------------..--------------------------------------------. - * | TAB | (,<) | (.>) | - ([{) | = (]}) || ] (=+) | pad * | pad + | pad - | [ (/?) | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | - * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' - * | F11 | F12 | | || | | | | - * |--------+--------+--------+--------||--------+--------+--------+--------| - * | | | | || | | | | - * '-----------------------------------''-----------------------------------' - */ - -[_NUM] = { /* Number layout along the home row for maximum speed*/ - {KC_TAB, _______, _______, KC_MINS, KC_EQL, KC_RBRC, KC_PAST, KC_PPLS, KC_PMNS, KC_LBRC }, - {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 }, - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, - {XXXXXXX, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, XXXXXXX }, - {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX } -}, - - -/* Fn layout, for typing purposes (Dvorak result in parens) - * .--------------------------------------------..--------------------------------------------. - * | ` | | MS_U | | || WH_U | WH_L | BTN3 | WH_R | [ (/?) | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | ESC | MS_L | MS_D | MS_R | || WH_D | BTN1 | BTN2 | | ' (-_) | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | APP | MPRV | MPLY | MSTP | MNXT || | BSPC | DEL | INS | \ | - * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' - * | VOLU | | | || | | PGUP | | - * |--------+--------+--------+--------||--------+--------+--------+--------| - * | VOLD | | | || | HOME | PGDN | END | - * '-----------------------------------''-----------------------------------' - */ - -[_FN] = { /* Function Layer, primary alternative layer featuring numpad on right hand, - cursor keys on left hand, and all symbols*/ - {KC_GRV, _______, KC_MS_U, _______, _______, KC_WH_U, KC_WH_L, KC_BTN3, KC_WH_R, KC_LBRC }, - {KC_ESC, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_WH_D, KC_BTN1, KC_BTN2, _______, KC_QUOT }, - {KC_APP, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, _______, KC_BSPC, KC_DEL, KC_INS, KC_BSLS }, - {XXXXXXX, KC_VOLU, _______, _______, _______, _______, _______, KC_PGUP, _______, XXXXXXX }, - {XXXXXXX, KC_VOLD, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, XXXXXXX } -}, - -/* blank key layout template - * .--------------------------------------------..--------------------------------------------. - * | | | | | || | | | | | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | | | | | || | | | | | - * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| - * | | | | | || | | | | | - * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' - * | | | | || | | | | - * |--------+--------+--------+--------||--------+--------+--------+--------| - * | | | | || | | | | - * '-----------------------------------''-----------------------------------' - */ + /* QWERTY + * .--------------------------------------------..--------------------------------------------. + * | Q | W | E | R | T || Y | U | I | O | P | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | A | S | D | F | G || J | H | K | L | ; | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | Z | X | C | V | B || N | M | , | . | / | + * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' + * | PGUP | TAB | LCTRL | SPACE || LSHIFT | ENTER | UP | PSCR | + * |--------+--------+--------+--------||--------+--------+--------+--------| + * | PGDN | LGUI | LALT | FN || NUM | LEFT | DOWN | RIGHT | + * '-----------------------------------''-----------------------------------' + */ + [_STD] = LAYOUT( /* Standard; as compatible with dvorak and qwerty as possible */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_PGUP, KC_TAB, KC_LCTL, KC_SPC, KC_LSFT, KC_ENT, KC_UP, KC_PSCR, + KC_PGDN, KC_LGUI, KC_LALT, MO(_FN), MO(_NUM), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Number layout, for data entry and programming purposes (Dvorak result in parens) + * .--------------------------------------------..--------------------------------------------. + * | TAB | (,<) | (.>) | - ([{) | = (]}) || ] (=+) | pad * | pad + | pad - | [ (/?) | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | + * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' + * | F11 | F12 | | || | | | | + * |--------+--------+--------+--------||--------+--------+--------+--------| + * | | | | || | | | | + * '-----------------------------------''-----------------------------------' + */ + [_NUM] = LAYOUT( /* Number layout along the home row for maximum speed*/ + KC_TAB, _______, _______, KC_MINS, KC_EQL, KC_RBRC, KC_PAST, KC_PPLS, KC_PMNS, KC_LBRC, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + + /* Fn layout, for typing purposes (Dvorak result in parens) + * .--------------------------------------------..--------------------------------------------. + * | ` | | MS_U | | || WH_U | WH_L | BTN3 | WH_R | [ (/?) | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | ESC | MS_L | MS_D | MS_R | || WH_D | BTN1 | BTN2 | | ' (-_) | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | APP | MPRV | MPLY | MSTP | MNXT || | BSPC | DEL | INS | \ | + * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' + * | VOLU | | | || | | PGUP | | + * |--------+--------+--------+--------||--------+--------+--------+--------| + * | VOLD | | | || | HOME | PGDN | END | + * '-----------------------------------''-----------------------------------' + */ + [_FN] = LAYOUT( /* Function Layer, primary alternative layer featuring numpad on right hand, + cursor keys on left hand, and all symbols*/ + KC_GRV, _______, KC_MS_U, _______, _______, KC_WH_U, KC_WH_L, KC_BTN3, KC_WH_R, KC_LBRC, + KC_ESC, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_WH_D, KC_BTN1, KC_BTN2, _______, KC_QUOT, + KC_APP, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, _______, KC_BSPC, KC_DEL, KC_INS, KC_BSLS, + KC_VOLU, _______, _______, _______, _______, _______, KC_PGUP, _______, + KC_VOLD, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + /* blank key layout template + * .--------------------------------------------..--------------------------------------------. + * | | | | | || | | | | | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | | | | | || | | | | | + * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| + * | | | | | || | | | | | + * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' + * | | | | || | | | | + * |--------+--------+--------+--------||--------+--------+--------+--------| + * | | | | || | | | | + * '-----------------------------------''-----------------------------------' + */ }; void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); - + switch (layer) { case _STD: set_led_off; -- cgit v1.2.3