diff options
Diffstat (limited to 'keyboards/mitosis')
-rw-r--r-- | keyboards/mitosis/config.h | 48 | ||||
-rw-r--r-- | keyboards/mitosis/info.json | 16 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/carvac_dv/keymap.c | 123 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/carvac_dv/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/datagrok/config.h | 57 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/datagrok/keymap.c | 237 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/datagrok/readme.md | 274 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/datagrok/rules.mk | 34 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/default/keymap.c | 195 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/mjt/config.h | 24 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/mjt/keymap.c | 337 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/mjt/rules.mk | 12 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/nzen/keymap.c | 207 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/nzen/readme.md | 75 | ||||
-rw-r--r-- | keyboards/mitosis/keymaps/nzen/rules.mk | 8 | ||||
-rw-r--r-- | keyboards/mitosis/matrix.c | 72 | ||||
-rw-r--r-- | keyboards/mitosis/mitosis.c | 26 | ||||
-rw-r--r-- | keyboards/mitosis/mitosis.h | 62 | ||||
-rw-r--r-- | keyboards/mitosis/readme.md | 29 | ||||
-rw-r--r-- | keyboards/mitosis/rules.mk | 24 |
20 files changed, 0 insertions, 1861 deletions
diff --git a/keyboards/mitosis/config.h b/keyboards/mitosis/config.h deleted file mode 100644 index 1310866fbb..0000000000 --- a/keyboards/mitosis/config.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 10 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -//#define BACKLIGHT_LEVELS 3 - -#define ONESHOT_TIMEOUT 500 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT diff --git a/keyboards/mitosis/info.json b/keyboards/mitosis/info.json deleted file mode 100644 index 07d3c8f5ec..0000000000 --- a/keyboards/mitosis/info.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "keyboard_name": "Mitosis", - "manufacturer": "Unknown", - "url": "", - "maintainer": "qmk", - "usb": { - "vid": "0xFEED", - "pid": "0x6060", - "device_version": "0.0.1" - }, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0.75}, {"x":1, "y":0.25}, {"x":2, "y":0}, {"x":3, "y":0.25}, {"x":4, "y":0.125}, {"x":7, "y":0.125}, {"x":8, "y":0.25}, {"x":9, "y":0}, {"x":10, "y":0.25}, {"x":11, "y":0.75}, {"x":0, "y":1.75}, {"x":1, "y":1.25}, {"x":2, "y":1}, {"x":3, "y":1.25}, {"x":4, "y":1.125}, {"x":7, "y":1.125}, {"x":8, "y":1.25}, {"x":9, "y":1}, {"x":10, "y":1.25}, {"x":11, "y":1.75}, {"x":0, "y":2.75}, {"x":1, "y":2.25}, {"x":2, "y":2}, {"x":3, "y":2.25}, {"x":4, "y":2.125}, {"x":7, "y":2.125}, {"x":8, "y":2.25}, {"x":9, "y":2}, {"x":10, "y":2.25}, {"x":11, "y":2.75}, {"x":1.5, "y":3.75}, {"x":2.5, "y":3.75}, {"x":3.5, "y":3.75}, {"x":4.5, "y":3.75}, {"x":6.5, "y":3.75}, {"x":7.5, "y":3.75}, {"x":8.5, "y":3.75}, {"x":9.5, "y":3.75}, {"x":1.5, "y":4.75}, {"x":2.5, "y":4.75}, {"x":3.5, "y":4.75}, {"x":4.5, "y":4.75}, {"x":6.5, "y":4.75}, {"x":7.5, "y":4.75}, {"x":8.5, "y":4.75}, {"x":9.5, "y":4.75}] - } - } -} diff --git a/keyboards/mitosis/keymaps/carvac_dv/keymap.c b/keyboards/mitosis/keymaps/carvac_dv/keymap.c deleted file mode 100644 index 842556324f..0000000000 --- a/keyboards/mitosis/keymaps/carvac_dv/keymap.c +++ /dev/null @@ -1,123 +0,0 @@ -// This is the Dvorak-friendly layout for the Mitosis by CarVac (/u/CarVac) -// It features space on the left thumb, shift on the right thumb, a -// number layer with all the numbers on the home row, and a function layer -// that provides mouse keys among other things. - -#include QMK_KEYBOARD_H - -enum mitosis_layers -{ - _STD, - _NUM, - _FN -}; - - -//Mousekeys -#define MOUSEKEY_DELAY 300 -#define MOUSEKEY_INTERNAL 50 -#define MOUSEKEY_MAX_SPEED 20 -#define MOUSEKEY_TIME_TO_MAX 30 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 - -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] = 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 = get_highest_layer(layer_state); - - switch (layer) { - case _STD: - set_led_off; - break; - case _FN: - set_led_blue; - break; - case _NUM: - set_led_red; - break; - default: - break; - } -}; diff --git a/keyboards/mitosis/keymaps/carvac_dv/rules.mk b/keyboards/mitosis/keymaps/carvac_dv/rules.mk deleted file mode 100644 index 6c605daecf..0000000000 --- a/keyboards/mitosis/keymaps/carvac_dv/rules.mk +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes diff --git a/keyboards/mitosis/keymaps/datagrok/config.h b/keyboards/mitosis/keymaps/datagrok/config.h deleted file mode 100644 index 5f37d27e69..0000000000 --- a/keyboards/mitosis/keymaps/datagrok/config.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#ifdef MITOSIS_DATAGROK_SLOWUART -// This is the highest possible baud rate that a pro micro clocked at 8Mhz can -// support without errors. I don't notice any difference in behavior at this -// slower speed. (So I think it should maybe be the default, to allow a single -// codebase to support both available flavors of pro micro.) This requires a -// corresponding change to the wireless module firmware; see -// https://github.com/reversebias/mitosis/pull/10 -#undef SERIAL_UART_BAUD // avoids redefinition warning -#define SERIAL_UART_BAUD 250000 -#endif - -// I want to place an underscore as tap behavior on the right shift key. But -// RSFT_T(KC_UNDS) doesn't work; mod-tap doesn't work with pre-shifted keys. So -// instead I take advantage of Space Cadet Shift that does something similar -// and just tweak it to use the -/_ key instead of 0/). See -// https://github.com/qmk/qmk_firmware/pull/2055 -#define RSPC_KEY KC_MINS - -// TODO: figure out which of these I can safely enable to reduce firmware size. -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT // can't; errors -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#ifdef AUDIO_ENABLE -#define STARTUP_SONG SONG(STARTUP_SOUND) -#define DEFAULT_LAYER_SONGS { \ - SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND), \ - SONG(WORKMAN_SOUND), \ - } -#define AUDIO_VOICES -#define AUDIO_CLICKY -#define AUDIO_PIN C6 -#endif - -#endif - -#define LAYOUT_bottomspace( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k31, k32, k33, k34, k35, k36, k37, k38, \ - k41, k42, k43, k44, k45, k46, k47, k48 \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ - { KC_NO, k31, k32, k43, k44, k45, k46, k37, k38, KC_NO }, \ - { KC_NO, k41, k42, k33, k34, k35, k36, k47, k48, KC_NO } \ - } diff --git a/keyboards/mitosis/keymaps/datagrok/keymap.c b/keyboards/mitosis/keymaps/datagrok/keymap.c deleted file mode 100644 index 7c77eb882f..0000000000 --- a/keyboards/mitosis/keymaps/datagrok/keymap.c +++ /dev/null @@ -1,237 +0,0 @@ -#include QMK_KEYBOARD_H - -#ifdef AUDIO_ENABLE -#include "audio.h" -#ifdef DEFAULT_LAYER_SONGS -extern float default_layer_songs[][16][2]; -#endif -#endif - -enum mitosis_layers - { - _xQ, // qwerty - _xC, // colemak - _xD, // dvorak - _xW, // workman - _xS, // symbols - _xN, // numbers - _xF // functions - }; - -enum mitosis_keycodes - { - KC_LAYO = SAFE_RANGE - }; - -// Setting MITOSIS_DATAGROK_BOTTOMSPACE in rules.mk will swap the upper and -// lower center four thumb-keys. See keymaps/datagrok/rules.mk. -#ifdef MITOSIS_DATAGROK_BOTTOMSPACE -#undef LAYOUT -#define LAYOUT LAYOUT_bottomspace -#endif - -// I don't use Japanese myself, but I've placed henkan 変換 and muhenkan 無変換 -// in my layout to act as left and right HYPER - -// Momentary tri-state layers. Mitosis default keymap does this too but employs -// new keymappings and a bunch of conditional code. This simpler keymap -// accomplishes it but with a small quirk: triggering both layers then releasing -// one out-of-order will leave the tri-state triggered until the other is -// released. Which doesn't bother me. - -// The weird /*,*/ comments are a hack to get slightly better automatic -// tabulation in my editor. - -// We use Space Cadet KC_RSPC to get _ on right shift. See config.h for details. - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_xQ] = LAYOUT( - 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_QUOT, - /*, */ KC_LGUI, KC_LCTL, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RCTL, KC_RGUI, - /*, */ KC_HENK, KC_LALT, MO(_xN), LSFT_T(KC_TAB), KC_RSPC, MO(_xN), KC_RALT, KC_MHEN), - [_xC] = LAYOUT( - KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, - KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_QUOT, - /*, */ _______, _______, _______, _______, _______, _______, _______, _______, - /*, */ _______, _______, _______, _______, _______, _______, _______, _______), - [_xD] = LAYOUT( - KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, - KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, - KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, - /*, */ _______, _______, _______, _______, _______, _______, _______, _______, - /*, */ _______, _______, _______, _______, _______, _______, _______, _______), - [_xW] = LAYOUT( - KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, - KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, - KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT, - /*, */ _______, _______, _______, _______, _______, _______, _______, _______, - /*, */ _______, _______, _______, _______, _______, _______, _______, _______), - [_xS] = LAYOUT( - KC_ESC, KC_GRV , KC_UP, KC_EQL , KC_TILD, KC_PLUS, KC_CIRC, KC_AMPR, KC_PERC, KC_MINS, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PIPE, KC_AT, KC_DLR, KC_HASH, KC_ENT, - KC_BSLS, KC_LABK, KC_LCBR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_RCBR, KC_RABK, KC_SLSH, - /*, */ _______, _______, _______, KC_DEL, _______, _______, _______, _______, - /*, */ _______, _______, TT(_xF), _______, _______, TT(_xF), _______, _______), - [_xN] = LAYOUT( - KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_PPLS, KC_7, KC_8, KC_9, KC_PMNS, - KC_SLCK, KC_F4, KC_F5, KC_F6, KC_F11, KC_NLCK, KC_4, KC_5, KC_6, KC_PENT, - KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F12, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS, - /*, */ _______, _______, TT(_xF), _______, _______, TT(_xF), KC_0, KC_DOT, - /*, */ _______, _______, _______, _______, _______, _______, _______, _______), - [_xF] = LAYOUT( - QK_BOOT, KC_INS, KC_PGUP, DEBUG, KC_VOLU, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PMNS, - CK_TOGG, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PENT, - KC_LAYO, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, - /*, */ CK_UP, MU_TOG, _______, _______, _______, _______, KC_P0, KC_PDOT, - /*, */ CK_DOWN, MU_MOD, _______, _______, _______, _______, _______, _______), -}; -const bool defaultlayers[] = { - [_xQ] = true, - [_xC] = true, - [_xD] = true, - [_xW] = true, - [_xS] = false, - [_xN] = false, - [_xF] = false, -}; -const size_t defaultlayers_n = sizeof(defaultlayers) / sizeof(defaultlayers[0]); - -// New keycode KC_LAYO rotates between available default layers (for e.g., -// selecting a base layout). Shift+KC_LAYO makes the current one persistent. -bool process_record_layout(uint16_t keycode, keyrecord_t *record) { - uint8_t default_layer; - uint8_t i; - #if defined(AUDIO_ENABLE) - float saved_song[][2] = SONG(COIN_SOUND); - #endif - - if (keycode != KC_LAYO || !record->event.pressed) { - return true; - } - - if (get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))) { // shift pressed - // save default layer. whatever the current default layer is, store that - eeconfig_update_default_layer(default_layer_state); - #if defined(AUDIO_ENABLE) - PLAY_SONG(saved_song); - #endif - } else { - // rotate default layer. - // find the current default layer - default_layer = get_highest_layer(default_layer_state); - // find next valid default layer - for (i = 1; i < defaultlayers_n; i++) { - if (defaultlayers[(default_layer + i) % defaultlayers_n]) { - break; - } - } - if (i == defaultlayers_n) { - // we fell out of the loop without finding another default layer to switch - // to. - return false; - } - default_layer = (default_layer + i) % defaultlayers_n; - default_layer_set(1U<<default_layer); - led_set(host_keyboard_leds()); - #if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) - PLAY_SONG(default_layer_songs[default_layer]); - #endif - } - return false; -} - -// This is a hack to place <question mark> on <shift-comma> and <exclamation -// mark> on <shift-period>, when using an operating system configured for a -// US/qwerty layout. -// cdeq = "comma dot exclamation question" -bool comm_shifted = false; -bool ques_shifted = false; -bool process_record_cdeq(uint16_t keycode, keyrecord_t *record) { - uint8_t shifted; - uint16_t s_keycode; - bool *k_shifted; - - switch (keycode) { - case KC_COMM: - s_keycode = KC_SLSH; - k_shifted = &comm_shifted; - break; - case KC_DOT: - s_keycode = KC_1; - k_shifted = &ques_shifted; - break; - default: - return true; - } - - shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); - - // Keydown. If shift is currently pressed, register its alternate keycode. - if (record->event.pressed && shifted) { - *k_shifted = true; - register_code(s_keycode); - return false; - // Keyup. If shift was pressed back when the key was pressed, unregister - // its alternate keycode. - } else if (!(record->event.pressed) && *k_shifted) { - *k_shifted = false; - unregister_code(s_keycode); - return false; - // Otherwise, behave as normal. - } else { - return true; - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return \ - process_record_cdeq(keycode, record) && \ - process_record_layout(keycode, record); -} - -// Set the bits of A selected by MASK to the corresponding bits of B -#define setbits(A, B, MASK) A = (A & (B | ~MASK)) | (B & MASK) - -void led_set_user(uint8_t usb_leds) { - // A simple (but technically inaccurate) model of the momentary layer state: - // Red layer active -> indicator = red - // Blue layer active -> indicator = blue - // Purple layer active -> indicator = purple - // the Pro Micro tx LED displays Num Lock status. - // - // Workman layout active -> indicator = green - // Workman red layer -> indicator = yellow (red + green) - // Workman blue layer -> indicator = cyan (blue + green) - // Workman purple layer -> indicator = white (red + blue + green) - - // Bit # 7 6 5 4 3 2 1 0 - // layer_state: [ | _xF | _xN | _xS | _xW | _xD | _xC | _xQ ] - // usb_led [ | | |kana |cmps |scrl |caps | num ] - // PORTB: [ NC | 10 | 9 | 8 | 14 | 16 | 15 |rxled] - // PORTC: [ NC | 5 | | | | | | ] - // PORTD: [ 6 | NC |txled| 4 | tx* | rx* | grn | p29 ] - // PORTE: [ | 7 | | | | | | ] - // PORTF: [ a0 | a1 | red | blu | | | NC | NC ] - // - // PD0 is connected to the pairing switch and p29 on the wireless module. - // PF0,PF1,PB7,PC7,PD6 are not broken out by the pro micro board. I don't understand why. - // PB1-PB6,PD4,PD5,PD6,PF6,PF7 are not connected to the Mitosis receiver - // board. Each may be connected to an LED by way of a resistor (4.7k to - // match the others) for a total of 14 additional indicators. - - uint32_t portf_bits = \ - ((layer_state|default_layer_state)&0b01100000)>>1 | \ - ((layer_state|default_layer_state)&0b00010000)<<1 | \ - ((layer_state|default_layer_state)&0b01000000)>>2; - uint32_t portd_bits = \ - (usb_leds&0b1)<<5 | \ - ((layer_state|default_layer_state)&0b1000)>>2; - // negated because for ports 0=LED on. - setbits(PORTF, ~portf_bits, 0b00110000); - setbits(PORTD, ~portd_bits, 0b00100010); -} - -// vim: set sw=2 et: diff --git a/keyboards/mitosis/keymaps/datagrok/readme.md b/keyboards/mitosis/keymaps/datagrok/readme.md deleted file mode 100644 index 22d7f4d2fc..0000000000 --- a/keyboards/mitosis/keymaps/datagrok/readme.md +++ /dev/null @@ -1,274 +0,0 @@ -# a layout for the Mitosis - -- Emphasis on momentary modifiers, all usable from either hand, arranged symmetrically, but left/right distinguishable by the OS. - I place left- and right-versions of Shift, GUI ("Super"), and Alt ("Meta"), and Henkan/Muhenkan (which I plan to overload for "Hyper"). - - I'm going for a [Space Cadet](https://en.wikipedia.org/wiki/Space-cadet_keyboard) aesthetic; - I want a keyboard that can (even just in theory) make use of all the bucky bits my operating system can support. - -- Red key and Blue key momentary-enable (like a shift key) one of three layers: - - - Red: Symbols layer - - Blue: Numbers layer - - "Purple" (both Red and Blue): Functions layer - - This tri-state layer mechanism is a bit similar to Planck and Preonic's "Raise," "Lower," and "Adjust." - -- The base layer is QWERTY. - [Colemak][], [Dvorak][], and [Workman][] may be toggled using `Red`+`Blue`+`Z`. - When you find the one you like, save it with `Shift`+`Red`+`Blue`+`Z`. - -- Minimize hand travel, so as not to lose orientation with home row. - -- `?` and `!` are moved to take the place of `<` and `>`. - Rationale: unmodded and shifted keys should be for prose, while symbols useful for programming should be colocated on their own layer. - -- Key positions chosen for mnemonics. - For example, you can distinguish between alphanumeric numerals and keypad numerals, but they occupy the same key positions. - -## Layout Images - -![mitosis:datagrok layout base layer](https://i.imgur.com/tap5Pjf.png) - -Base layer. Notes: -- customized comma and period, which have exclamation point and question mark on their shift layer. -- tap right-shift for underscore, tap left-shift for tab. - -![mitosis:datagrok layout red layer](https://i.imgur.com/sMGr34T.png) - -Red layer. Intended for common navigation and programming symbols. Notes: -- symmetric layout of paired braces/brackets/slashes for easier memorization -- arrows placed directly on home position - -![mitosis:datagrok layout blue layer](https://i.imgur.com/dDb2563.png) - -Blue layer. Intended for "number pad." Notes: -- Keycodes generated for numbers, enter key, and mathematical symbols are from the alphanumeric keys, not keypad. - This way they are not influenced by the state of Num Lock. - If you want to send the keypad equivalents, just press Blue as well to access keypad numbers in the same positions in the Purple layer. - -![mitosis:datagrok layout purple layer](https://i.imgur.com/pESzy2u.png) - -Purple (Red+Blue) layer. Intended for "true keypad" and various functions. Notes: -- Numbers on this layer send Keypad codes, so the result will be affected by the state of Num Lock. -- "Switch Layout" toggles the alphabet keys between QWERTY, Colemak, Dvorak, and Workman. - Shift + "Switch Layout" stores the currently selected alphabet layout in eeprom, so the selection persists across reboots and computers. -- Page Up / Page Down / Home / End are placed on corresponding arrow keys. - -Keyboard layout editor sources: -[base](http://www.keyboard-layout-editor.com/#/gists/bc2d06a3203d1bc3a14ed2245cf39643) -[red](http://www.keyboard-layout-editor.com/#/gists/dbbf65f726a5522824b75117a62a321e) -[blue](http://www.keyboard-layout-editor.com/#/gists/240e807f3d7e1d3ddabe1b69ee675048) -[purple](http://www.keyboard-layout-editor.com/#/gists/9559f0f8bb1ee47677c8f2b4d766829d) - -[Imgur album](https://imgur.com/a/hm4bbdM) - -## Indicators - -- When Red layer is active, the RGB indicator turns red. -- When Blue layer is active, the RGB indicator turns blue. -- When Purple layer is active, the RGB indicator turns purple. -- When the Workman layer is active, the RGB indicator turns green. - Currently, this means that activating the Red layer while using the Workman layout will make the indicator show yellow. (red + green.) -- The Num Lock status is shown on the Pro Micro tx LED. -- If you attach a speaker to PC6 (pin 5) and compile with AUDIO_ENABLE=yes, music will be played at startup, when switching default layers, and when saving the default layer. - -## Variants - -Some additional compile-time options for this layout are available by editing rules.mk or compiling like so: - -Normal compilation: - -```make mitosis:datagrok``` - -Swap Space onto bottom thumb row: swaps Red/Backspace/Space/Red with Blue/Shift/Shift/Blue: - -```make mitosis:datagrok MITOSIS_DATAGROK_BOTTOMSPACE=yes``` - -Lower baud UART. Useful when using an 8Mhz pro micro; corresponding changes required in wireless firmware. See rules.mk for details. - -```make mitosis:datagrok MITOSIS_DATAGROK_SLOWUART=yes``` - -## Design notes - -### Workman layout - -- I'm learning a new physical key placement, so I might as well go all-out and use an optimal non-QWERTY layout. - Bonus: it's easy to switch back to QWERTY on a traditional row-staggered keyboard. - The designer of the Mitosis had [a similar experience](https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/dgfr22q/). - -- I like the way Workman feels and some of its advantages over Colemak. - Unfortunately, it was designed using a weighting system based on a standard - row-staggered keyboard so is probably not as optimal as one could achieve - on an ergonomic board like the Mitosis. Maybe run an optimizer routine after I - determine good values for key difficulty on the Mitosis. - -### 8Mhz Pro Micro - -- I (used to) use a 3.3v Pro Micro clocked at 8Mhz rather than the 5v 16Mhz specified in the Mitosis design. - That can't communicate with the connected wireless module at the default speed of 1M baud. - The next fastest baudrate that works without errors is 250k baud. - So if you want to do the same: - - - Set the Pro Micro clock and baud rate correctly in `rules.mk`: - ``` - F_CPU = 800000 - MITOSIS_DATAGROK_SLOWUART = yes - ``` - - Configure the receiver's wireless module to communicate at 250k baud in `main.c`. See https://github.com/reversebias/mitosis/pull/10 - ``` - - UART_BAUDRATE_BAUDRATE_Baud1M - + UART_BAUDRATE_BAUDRATE_Baud250000 - ``` - -### Layout mnemonics - -- Paired programming symbols (braces, brackets, parentheses) are arranged symmetrically in the Red layer. - -- Arrow keys are in the home position on the Red layer. - - - Blue+Arrows = PgUp/PgDn/Home/End, which is intuitive for me and similar to what is done on Apple and some Dell keyboards. - -- The number pad: I placed the ten-key number pad on the Blue layer. - However, this would do the wrong thing when Num Lock was not enabled. - Rather than attempt to manage the state of Num Lock, I arranged the normal number keys in a ten-key layout on the Blue layer instead. - If you explicitly want the keypad keys, they're in the same position on the Red+Blue layer. - -- Number-pad add, subtract, multiply, and divide are located on the same keys as alphanumeric plus, dash, asterisk, and slash, respectively. - -- The Function-keys are arranged to mimic the order of the ten-key pad. - -- Enter is now in a more qwerty-familiar location, and may be activated with one hand. - Numpad Enter is in the same position for mnemonics. - -- Why do I dislike [snake\_case](https://en.wikipedia.org/wiki/Snake_case) (`__variable_names_that_use_underscores_`)? - Maybe because it's hard to type all those underscores requiring the shift key? - Hypothesis: I'll be less annoyed by snake case by placing `_` at an unmodded position, right near the `space` key. - - -## Changelog - -### Current - -- Discard "intentionally difficult backspace" idea. - Tab returns to left-shift. - Del returns to Red+Backspace -- "High Profile mode:" Swap Red/Backspace/Space/Red with Blue/Shift/Shift/Blue (placing space on lower thumb keys) using `MITOSIS_DATAGROK_BOTTOMSPACE=yes` when compiling. -- Move Print Screen / Scroll Lock / Pause to pinky column on Blue layer. -- Let's try using TT instead of MO so we can e.g. lock-on the keypad. - - We still use MO for first modifier, so e.g. Red + tapping Blue will lock purple. - So far it feels a bit janky, we'll see. -- One key `KC_LAYO` to cycle through available base layers instead of a dedicated key for each; - Shift + `KC_LAYO` stores current base layer selection in eeprom so it comes back after disconnecting or a reset. -- Added Colemak and Dvorak as default layers that may be selected. -- Set UART to 250kbaud with make argument `MITOSIS_DATAGROK_SLOWUART=yes`, for use with 8Mhz Pro Micros. -- Display Num Lock status on tx LED - -### 0.6.60 - -- Experiment: no-modifier underscore on right shift key. -- New combined numbers + keypad arrangement. - No more worrying about Num Lock key. -- Move F-keys to left board to make room. - Calling them "the Numbers layer" and "the Functions layer" is now less accurate but the arrangement feels better. -- Audio working! -- Move Tab and Space to upper thumb row. - I discarded the high-profile acrylic case from my Mitosis. - With a low-profile case, it's easier to hit the upper row of thumb keys. -- Discard all my `#defines` for "Meta", "Super", and "Hyper". - I can call them that without making the code confusing to others. -- Move Backspace to Red+A. I shouldn't be using it much anyway. - This means Tab and Shift might as well be separate keys again. -- Distribute paired symbols symmetrically across boards like `\<{([ ])}>/`. - Opening-symbols on the right hand was a failed experiment. -- Change default back to target a 16Mhz/5v Pro Micro. - I damaged the 8Mhz Pro Micro I was using so now I'm back to using a 16mhz Pro Micro again. - -### 0.6.1 - -- Place Tab on Shift without a modifier. We use it frequently for autocomplete. -- Make QWERTY the default layout. So more people can try it out. My customized Workman is easily toggled-on. -- Don't use redundant `#define` for `KC_TRNS` -- Place Num Lock somewhere. Otherwise (if it gets turned off) we can't type any numbers! -- Add some media keys - -### 0.5.155 - -- Enable use with my 3.3v Pro Micro -- Add a toggle-able QWERTY layer -- Golf down the LED-setting code -- Place `!` and `?` on `Shift`+`,` and `Shift`+`.`. -- Distribute paired symbols symmetrically across boards like `\)}]> <[{(/` - -### 0.5.129 - -- A modified Workman variant for Mitosis -- Arrows in home position, modifier + Arrow = PgUp/PgDn/Home/End -- Load all paired symbols onto angle-bracket keys. - -### Abandoned ideas - -- Abandoned: intentionally-difficult backspace. - "Backspace is one of the keys I most dislike on a QWERTY keyboard because it moves me away from homerow and I need to use it so often. - Rather than make it easier to strike, I want to discourage myself from using it and train myself to type more accurately." - - - Many other people like an easy-to-reach backspace. - - Many other split-spacebar ergo boards place backspace at the thumbs. - - I can still train myself to type well with |