From 163129b644059761c20800cfcca1c94e0ebb9b73 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 3 Oct 2020 13:52:03 -0400 Subject: [PATCH] update gergoplex --- gergoplex/combos.def | 3 +- gergoplex/gergoplex.def | 2 - gergoplex/keymap.c | 90 +++++++++++++++++++++++++++++++++++++++-- gergoplex/rules.mk | 17 +++++--- 4 files changed, 99 insertions(+), 13 deletions(-) diff --git a/gergoplex/combos.def b/gergoplex/combos.def index e4d765f..70403e0 100644 --- a/gergoplex/combos.def +++ b/gergoplex/combos.def @@ -7,7 +7,8 @@ // User includes #include "gergoplex.def" -#include "kadis.def" +#include "combos/kadis.def" // Word completion //#include "combos/eng-combos.def" +#include "combos/k8s-helpers.def" diff --git a/gergoplex/gergoplex.def b/gergoplex/gergoplex.def index f0855d7..5ccc888 100644 --- a/gergoplex/gergoplex.def +++ b/gergoplex/gergoplex.def @@ -8,5 +8,3 @@ COMB(mcUnds, KC_UNDS, KC_M, KC_COMM) COMB(nmQuot, KC_QUOT, KC_N, KC_M) COMB(gbClic, KC_BTN1, KC_G, KC_B) COMB(fvClic, KC_BTN2, KC_F, KC_V) - -SUBS(pasta, "I'd just like to interject for a moment.", KC_H, KC_J, KC_K, KC_L) diff --git a/gergoplex/keymap.c b/gergoplex/keymap.c index 58716ec..fabce6b 100644 --- a/gergoplex/keymap.c +++ b/gergoplex/keymap.c @@ -8,11 +8,71 @@ #include QMK_KEYBOARD_H #include "g/keymap_combo.h" +#include "keymap_steno.h" +#include "keymap_plover.h" #define BASE 0 // default layer #define SYMB 1 // symbols #define NUMB 2 // numbers/motion #define LOJB 3 // la .lojban. +#define STEN 4 // Steno + +enum kadis_keycodes { + STENO = SAFE_RANGE, + EXIT_STENO, +}; + +// Send PHROPB ({PLOVER:RESUME}). +void plover_resume(void) { + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RP); + register_code(PV_RB); + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RP); + unregister_code(PV_RB); +} + +// Send PHROF ({PLOVER:SUSPEND}). +void plover_suspend(void) { + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RF); + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RF); +} + +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 STENO: + steno_set_mode(STENO_MODE_GEMINI); + plover_resume(); + layer_on(STEN); + return false; + break; + case EXIT_STENO: + plover_suspend(); + layer_on(BASE); + return false; + break; + } + + return false; +} /* Combomap * @@ -20,6 +80,7 @@ * | | ESC | | | | | ESC | BSLH | * |-----+-----+-----+-----+------| |--------------------------------| * | | BSPC ENT | | | LES COLN GRT | | + * |-----+-----+-----+--RMB+-LMB--+ |--------------------------------| * | | MINS | | | | QUO UNDR | | | * `------+-----+-----+------+----' `--------------------------------' @@ -55,9 +116,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------. ,--------------------------------. * | ! | @ | { | } | | | | ` | ~ | COL | JBO | \ | * |-----+-----+-----+-----+------| |--------------------------------| - * | # | $ | ( | ) | LMB | | + | - | / | * | ' | + * | # | $ | ( | ) | STE | | + | - | / | * | ' | * |------+-----+-----+-----+-----| |--------------------------------| - * | % | ^ | [ | ] | RMB | | & | = | , | . | - | + * | % | ^ | [ | ] | | | & | = | , | . | - | * `------+-----+-----+------+----' `--------------------------------' * .-----------------. .------------------. * | MMB | ; | = | | = | ; | DEL | @@ -65,8 +126,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [SYMB] = LAYOUT_gergoplex( KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, TO(BASE), TO(LOJB), KC_BSLS, - KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, - KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, TO(STEN), KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, CMB_TOG, KC_SCLN, KC_EQL, // Left KC_EQL, KC_SCLN, KC_DEL // Right @@ -112,4 +173,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MT(MOD_LGUI, KC_ESC), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), // Left LT(NUMB, KC_SPC), KC_LSFT, MT(MOD_RSFT, KC_TAB) // Right ), + +/* Keymap 4: Steno + * ,-----------------------------. ,-------------------------------. + * | # | # | # | # | # | | # | # | # | # | # | + * |------+-----+-----+-----+-----| |-------------------------------| + * | S | T | P | H | * | | F | P | L | T | D | + * |------+-----+-----+-----+-----+ |-------------------------------| + * | S | K | W | R | * | | R | B | G | S | Z | + * `------+-----+-----+-----+-----' `-------------------------------' + * .-----------------. .-----------------. + * | Exit| A | O | | E | U | * | + * '-----------------' '-----------------' + */ +[STEN] = LAYOUT_gergoplex( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + + TO(BASE), STN_A, STN_O, // Left + STN_E, STN_U, STN_ST3 // Right + ), }; diff --git a/gergoplex/rules.mk b/gergoplex/rules.mk index afd7141..3dc18bb 100644 --- a/gergoplex/rules.mk +++ b/gergoplex/rules.mk @@ -3,16 +3,21 @@ # Make sure you have dfu-programmer installed! #---------------------------------------------------------------------------- # Firmware options -MOUSEKEY_ENABLE = yes +STENO_ENABLE = yes +MOUSEKEY_ENABLE = no #Debug options -VERBOSE = yes -DEBUG_MATRIX_SCAN_RATE = no -DEBUG_MATRIX = yes -CONSOLE_ENABLE = yes +VERBOSE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +CONSOLE_ENABLE = yes +COMBO_ENABLE = yes #Combos! -VPATH += keyboards/gboards/ +VPATH += keyboards/gboards/ + +LEADER_ENABLE = no +WPM_ENABLE = yes # A bunch of stuff that you shouldn't touch unless you # know what you're doing.