From 3e698a54ea22b12512c9e4f676f7d7363c35832f Mon Sep 17 00:00:00 2001 From: Vyolle <44031868+Vyolle@users.noreply.github.com> Date: Fri, 7 Dec 2018 18:50:43 -0600 Subject: [PATCH] Removed mousekeys. Added Levinson Steno keymap. (#4574) * Changed location of mouse 3, and arrow keys * Removed MouseKeys. Added Levinson Layout --- keyboards/iris/keymaps/vyolle/keymap.c | 18 +-- keyboards/levinson/keymaps/steno/config.h | 34 +++++ keyboards/levinson/keymaps/steno/keymap.c | 148 ++++++++++++++++++++++ keyboards/levinson/keymaps/steno/rules.mk | 7 + 4 files changed, 198 insertions(+), 9 deletions(-) create mode 100644 keyboards/levinson/keymaps/steno/config.h create mode 100644 keyboards/levinson/keymaps/steno/keymap.c create mode 100644 keyboards/levinson/keymaps/steno/rules.mk diff --git a/keyboards/iris/keymaps/vyolle/keymap.c b/keyboards/iris/keymaps/vyolle/keymap.c index 2479f0892..33e171821 100644 --- a/keyboards/iris/keymaps/vyolle/keymap.c +++ b/keyboards/iris/keymaps/vyolle/keymap.c @@ -32,29 +32,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_7, KC_8, KC_9, KC_PLUS, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSLS, KC_4, KC_5, KC_6, KC_MINUS, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_VOLU, KC_HOME, KC_LEFT, KC_UP, KC_RGHT, KC_PGUP, KC_WH_U, KC_MS_L, KC_MS_U, KC_MS_R, XXXXXXX, KC_BTN4, + KC_VOLU, KC_HOME, KC_LEFT, KC_UP, KC_RGHT, KC_PGUP, KC_PAST, KC_1, KC_2, KC_3, KC_EQL, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_VOLD, KC_END, KC_INS, KC_DOWN, KC_DEL, KC_PGDN, KC_MUTE, XXXXXXX, KC_WH_D, KC_WH_L, KC_MS_D, KC_WH_R, KC_BTN3, KC_BTN5, + KC_VOLD, KC_END, KC_INS, KC_DOWN, KC_DEL, KC_PGDN, KC_MUTE, _______, _______, KC_0, KC_COMM, KC_DOT, KC_ENT, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, _______, KC_BTN1, KC_BTN2, _______ + _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_RAISE] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_GRAVE,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TILD, KC_PIPE, KC_LT, KC_GT, _______, _______, _______, _______, _______, _______, _______, _______, + KC_GRAVE, KC_TILD, KC_UNDS, KC_EQL, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_BSLASH,KC_LCBR, KC_RCBR, KC_MINUS, KC_LBRC, KC_RBRC, _______, KC_LEFT, KC_UP, KC_RGHT, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_COLN, KC_UNDS, KC_LPRN, KC_PLUS, KC_RPRN, KC_EQL, KC_UNDO, _______, _______, _______, KC_DOWN, _______, _______, _______, + KC_COLN, KC_LT, KC_GT, KC_PLUS, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - KC_CUT, KC_COPY, KC_PSTE, _______, _______, _______ + _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), diff --git a/keyboards/levinson/keymaps/steno/config.h b/keyboards/levinson/keymaps/steno/config.h new file mode 100644 index 000000000..9cbc148e4 --- /dev/null +++ b/keyboards/levinson/keymaps/steno/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_I2C +// #define USE_SERIAL + + +#define FORCE_NKRO //For Steno. + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + + diff --git a/keyboards/levinson/keymaps/steno/keymap.c b/keyboards/levinson/keymaps/steno/keymap.c new file mode 100644 index 000000000..f997b4de1 --- /dev/null +++ b/keyboards/levinson/keymaps/steno/keymap.c @@ -0,0 +1,148 @@ +#include QMK_KEYBOARD_H +#include "keymap_steno.h" + +extern keymap_config_t keymap_config; + +#define _PLOVER 0 +#define _QWERTY 1 +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 4 + +enum custom_keycodes +{ + PLOVER = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + ADJUST, + EXT_QWE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = +{ + + [_PLOVER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + STN_PWR, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + STN_FN, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC, + //├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX, STN_RE1, STN_RE2, XXXXXXX, STN_A, STN_O, STN_E, STN_U, XXXXXXX, XXXXXXX, QWERTY, XXXXXXX + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + + ), + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + 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_P, KC_QUOT, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LGUI, KC_Z, KC_LALT, KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL, KC_RALT, EXT_QWE, KC_RGUI + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + + ), + + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_7, KC_8, KC_9, KC_PLUS, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_F7, KC_F8, KC_LEFT, KC_UP, KC_RGHT, KC_F9, KC_PSLS, KC_4, KC_5, KC_6, KC_MINUS, KC_MUTE, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_F10, KC_F11, KC_DOWN, KC_F11, KC_F12, KC_PAST, KC_1, KC_2, KC_3, KC_EQL, KC_VOLU, + //├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, KC_0, _______, KC_COMM, KC_DOT, KC_ENT, KC_VOLD + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRAVE, KC_TILD, KC_UNDS, KC_EQL, KC_PIPE, _______, KC_HOME, KC_DEL, _______, KC_INS, KC_PGUP, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_BSLASH,KC_LCBR, KC_RCBR, KC_MINUS, KC_LBRC, KC_RBRC, KC_END, KC_LEFT, KC_UP, KC_RGHT, KC_PGDN, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_COLN, KC_LT, KC_GT, KC_PLUS, KC_LPRN, KC_RPRN, _______, _______, KC_DOWN, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV, KC_HOME, KC_LBRC, KC_RBRC, KC_PIPE, KC_APP, KC_SLCK, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_PSCR, KC_END, KC_LCBR, KC_RCBR, KC_PLUS, KC_EQL, KC_PAUS, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, KC_BSLS, KC_MINS, KC_UNDS, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + + ), + + +}; + + +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case PLOVER: + if (record->event.pressed) { + set_single_persistent_default_layer(_PLOVER); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case QWERTY: + if (!record->event.pressed) { + layer_on(_QWERTY); + } + return false; + break; + case EXT_QWE: + if (record->event.pressed) { + layer_off(_QWERTY); + } + return false; + break; + } + return true; +} diff --git a/keyboards/levinson/keymaps/steno/rules.mk b/keyboards/levinson/keymaps/steno/rules.mk new file mode 100644 index 000000000..9c31e590e --- /dev/null +++ b/keyboards/levinson/keymaps/steno/rules.mk @@ -0,0 +1,7 @@ +EXTRAKEY_ENABLE = no # Disable if you run out of usb endpoints. Media keys need this to work. +MOUSEKEY_ENABLE = no # Mouse keys(+4700) Uses extra usb enpoints. +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER. +AUDIO_ENABLE = no # Audio output on port C6 +MIDI_ENABLE = no # MIDI controls +NKRO_ENABLE = yes +BOOTMAGIC_ENABLE = yes