refactor
This commit is contained in:
parent
d8fb925269
commit
710023825b
5 changed files with 112 additions and 122 deletions
60
assets/repeat-key-reference.md
Normal file
60
assets/repeat-key-reference.md
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
# Repeat & Magic Key Reference
|
||||||
|
|
||||||
|
## Repeat Key (Left Thumb)
|
||||||
|
Press any key, then tap **left thumb** to repeat it.
|
||||||
|
|
||||||
|
## Magic Key (Right Thumb)
|
||||||
|
Press a key, then tap **right thumb** for magic output:
|
||||||
|
|
||||||
|
### Same Finger Bigrams
|
||||||
|
| Key | Magic | Description |
|
||||||
|
|-----|-------|----------------|
|
||||||
|
| Y | S | "YS" 0.123% |
|
||||||
|
| E | O | "EO" 0.121% |
|
||||||
|
| R | L | "RL" 0.114% |
|
||||||
|
| U | I | "UI" 0.073% |
|
||||||
|
| O | E | "OE" 0.060% |
|
||||||
|
| P | T | "PT" 0.050% |
|
||||||
|
| S | Y | "SY" 0.024% |
|
||||||
|
| D | G | "DG" 0.021% |
|
||||||
|
|
||||||
|
### Magic Suffixes
|
||||||
|
| Key | Magic | Example |
|
||||||
|
|-------|---------|---------------|
|
||||||
|
| B | "efore" | before |
|
||||||
|
| I | "on" | ion |
|
||||||
|
| J | "ust" | just |
|
||||||
|
| M | "ent" | ment |
|
||||||
|
| N | "ion" | nation |
|
||||||
|
| T | "ment" | treatment |
|
||||||
|
| V | "er" | over |
|
||||||
|
| W | "hich" | which |
|
||||||
|
| X | "es" | fixes |
|
||||||
|
| , | " but" | text, but |
|
||||||
|
| Space | "the" | the |
|
||||||
|
|
||||||
|
### Coding Shortcuts
|
||||||
|
| Key | Magic | Result |
|
||||||
|
|-----|-------|--------|
|
||||||
|
| + | = | += |
|
||||||
|
| - | = | -= |
|
||||||
|
| * | = | *= |
|
||||||
|
| / | = | /= |
|
||||||
|
| > | Left | <\|> |
|
||||||
|
| ) | Left | (\|) |
|
||||||
|
| ] | Left | [\|] |
|
||||||
|
| } | Left | {\|} |
|
||||||
|
|
||||||
|
## Repeat Key Overrides
|
||||||
|
Press key, then tap **left thumb** for override:
|
||||||
|
|
||||||
|
| Key | Override | Example |
|
||||||
|
|-------|----------|---------|
|
||||||
|
| A | "nd" | and |
|
||||||
|
| I | "ng" | ing |
|
||||||
|
| Y | "ou" | you |
|
||||||
|
| N | "f" | nf |
|
||||||
|
| B | "ecause" | because |
|
||||||
|
| W | "ould" | would |
|
||||||
|
| , | " and" | , and |
|
||||||
|
| Space | "for" | for |
|
||||||
|
|
@ -1,38 +1,38 @@
|
||||||
// name result 1st chord key 2nd chord key 3rd chord key
|
// name result 1st chord key 2nd chord key 3rd chord key
|
||||||
|
|
||||||
// vertical
|
// vertical numbers
|
||||||
COMB(NUM_1, KC_1, KC_W, HRM_C)
|
COMB(num_1, KC_1, KC_W, KC_C)
|
||||||
COMB(NUM_2, KC_2, KC_L, HRM_R)
|
COMB(num_2, KC_2, KC_L, HRM_R)
|
||||||
COMB(NUM_3, KC_3, KC_Y, HRM_S)
|
COMB(num_3, KC_3, KC_Y, HRM_S)
|
||||||
COMB(NUM_4, KC_4, KC_P, HRM_T)
|
COMB(num_4, KC_4, KC_P, HRM_T)
|
||||||
COMB(NUM_5, KC_5, KC_B, KC_G)
|
COMB(num_5, KC_5, KC_B, KC_G)
|
||||||
COMB(NUM_6, KC_6, KC_Z, KC_M)
|
COMB(num_6, KC_6, KC_Z, KC_M)
|
||||||
COMB(NUM_7, KC_7, KC_F, HRM_N)
|
COMB(num_7, KC_7, KC_F, HRM_N)
|
||||||
COMB(NUM_8, KC_8, KC_O, HRM_E)
|
COMB(num_8, KC_8, KC_O, HRM_E)
|
||||||
COMB(NUM_9, KC_9, KC_U, HRM_I)
|
COMB(num_9, KC_9, KC_U, HRM_I)
|
||||||
COMB(NUM_0, KC_0, KC_QUOT, HRM_A)
|
COMB(num_0, KC_0, KC_QUOT, KC_A)
|
||||||
|
|
||||||
// top row
|
// top row
|
||||||
COMB(ly_lead, QK_LEAD, KC_L, KC_Y)
|
COMB(capsword, CW_TOGG, KC_L, KC_Y)
|
||||||
COMB(fo_lbrc, KC_LBRC, KC_F, KC_O)
|
COMB(paste, C(S(KC_V)), KC_O, KC_U)
|
||||||
COMB(ou_rbrc, KC_RBRC, KC_O, KC_U)
|
|
||||||
|
|
||||||
// middle row
|
// home row left
|
||||||
COMB(rs_tab, KC_TAB, HRM_R, HRM_S)
|
COMB(tab, KC_TAB, HRM_R, HRM_S)
|
||||||
COMB(st_delwrd, C(KC_BSPC), HRM_S, HRM_T)
|
COMB(delword, C(KC_BSPC), HRM_S, HRM_T)
|
||||||
|
|
||||||
COMB(ne_esc, KC_ESC, HRM_N, HRM_E)
|
// home row right
|
||||||
COMB(ei_ent, KC_ENT, HRM_E, HRM_I)
|
COMB(escape, KC_ESC, HRM_N, HRM_E)
|
||||||
SUBS(nei_write, "\e:w\n", HRM_N, HRM_E, HRM_I)
|
COMB(enter, KC_ENT, HRM_E, HRM_I)
|
||||||
|
SUBS(vim_save, "\e:w\n", HRM_N, HRM_E, HRM_I)
|
||||||
|
|
||||||
// bottom row
|
// bottom row left
|
||||||
COMB(jv_coln, KC_COLN, KC_J, KC_V)
|
COMB(vim_cmd, KC_COLN, HRM_J, KC_V)
|
||||||
COMB(vd_xmonad, G(KC_A), KC_V, SYM_D)
|
COMB(xmonad, G(KC_A), KC_V, HRM_D)
|
||||||
COMB(dk_shift, OSM(MOD_LSFT), SYM_D, KC_K)
|
|
||||||
|
// bottom row right
|
||||||
|
COMB(wezterm, A(KC_A), HRM_H, KC_SLSH)
|
||||||
|
COMB(esc_seq, KC_BSLS, KC_SLSH, HRM_COM)
|
||||||
|
|
||||||
COMB(xh_shift, OSM(MOD_RSFT), KC_X, SYM_H)
|
|
||||||
COMB(h_slash_wterm, A(KC_A), SYM_H, KC_SLSH)
|
|
||||||
COMB(slsh_comm_bsls, KC_BSLS, KC_SLSH, KC_COMM)
|
|
||||||
|
|
||||||
/* vim: set filetype=c: */
|
/* vim: set filetype=c: */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@
|
||||||
#define CHORDAL_HOLD
|
#define CHORDAL_HOLD
|
||||||
#define QUICK_TAP_TERM 0
|
#define QUICK_TAP_TERM 0
|
||||||
|
|
||||||
// Leader
|
|
||||||
#define LEADER_NO_TIMEOUT // disable initial timeout
|
|
||||||
#define LEADER_PER_KEY_TIMING // reset timeout for each key
|
|
||||||
#define LEADER_TIMEOUT 250
|
|
||||||
|
|
||||||
// Timeouts
|
// Timeouts
|
||||||
#define ONESHOT_TIMEOUT 5000
|
#define ONESHOT_TIMEOUT 5000
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "features/casemodes.h"
|
|
||||||
|
|
||||||
enum layers {
|
enum layers {
|
||||||
CANARY,
|
CANARY,
|
||||||
|
|
@ -40,6 +39,7 @@ enum custom_keycodes {
|
||||||
MG_THE,
|
MG_THE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Thumb Keys:
|
/* Thumb Keys:
|
||||||
* dual role keys for accessing layers and to offload shift from pinkies */
|
* dual role keys for accessing layers and to offload shift from pinkies */
|
||||||
|
|
||||||
|
|
@ -49,16 +49,16 @@ enum custom_keycodes {
|
||||||
/* Home Row Mods:
|
/* Home Row Mods:
|
||||||
* https://precondition.github.io/home-row-mods */
|
* https://precondition.github.io/home-row-mods */
|
||||||
|
|
||||||
#define HRM_C LSFT_T(KC_C)
|
#define HRM_R LALT_T(KC_R)
|
||||||
#define HRM_R LCTL_T(KC_R)
|
#define HRM_S LSFT_T(KC_S)
|
||||||
#define HRM_S LALT_T(KC_S)
|
|
||||||
#define HRM_T LGUI_T(KC_T)
|
#define HRM_T LGUI_T(KC_T)
|
||||||
|
#define HRM_D LCTL_T(KC_D)
|
||||||
|
#define HRM_J LT(SYM, KC_J)
|
||||||
#define HRM_N RGUI_T(KC_N)
|
#define HRM_N RGUI_T(KC_N)
|
||||||
#define HRM_E RALT_T(KC_E)
|
#define HRM_E RSFT_T(KC_E)
|
||||||
#define HRM_I RCTL_T(KC_I)
|
#define HRM_I RALT_T(KC_I)
|
||||||
#define HRM_A RSFT_T(KC_A)
|
#define HRM_H RCTL_T(KC_H)
|
||||||
#define SYM_D LT(SYM, KC_D)
|
#define HRM_COM LT(SYM, KC_COMM)
|
||||||
#define SYM_H LT(SYM, KC_H)
|
|
||||||
|
|
||||||
/* One Shot Keys:
|
/* One Shot Keys:
|
||||||
* https://github.com/qmk/qmk_firmware/blob/master/docs/one_shot_keys.md */
|
* https://github.com/qmk/qmk_firmware/blob/master/docs/one_shot_keys.md */
|
||||||
|
|
@ -80,9 +80,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
//,--------------------------------------------. ,--------------------------------------------.
|
//,--------------------------------------------. ,--------------------------------------------.
|
||||||
KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, KC_O, KC_U, KC_QUOT,
|
KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, KC_O, KC_U, KC_QUOT,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
HRM_C, HRM_R, HRM_S, HRM_T, KC_G, KC_M, HRM_N, HRM_E, HRM_I, HRM_A,
|
KC_C, HRM_R, HRM_S, HRM_T, KC_G, KC_M, HRM_N, HRM_E, HRM_I, KC_A,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
KC_Q, KC_J, KC_V, SYM_D, KC_K, KC_X, SYM_H, KC_SLSH, KC_COMM, KC_DOT,
|
KC_Q, HRM_J, KC_V, HRM_D, KC_K, KC_X, HRM_H, KC_SLSH, HRM_COM, KC_DOT,
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
NAV_REP, KC_SPC, KC_BSPC, NUM_MAG
|
NAV_REP, KC_SPC, KC_BSPC, NUM_MAG
|
||||||
//`-----------------' `-----------------'
|
//`-----------------' `-----------------'
|
||||||
|
|
@ -92,9 +92,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
//,--------------------------------------------. ,--------------------------------------------.
|
//,--------------------------------------------. ,--------------------------------------------.
|
||||||
XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX,
|
XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
OS_LSFT, OS_LCTL, OS_LALT, OS_LGUI, KC_VOLD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL,
|
XXXXXXX, OS_LALT, OS_LSFT, OS_LGUI, KC_VOLD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, OS_LCTL, XXXXXXX, XXXXXXX, KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
_______, _______, _______, _______
|
_______, _______, _______, _______
|
||||||
//`-----------------' `-----------------'
|
//`-----------------' `-----------------'
|
||||||
|
|
@ -102,11 +102,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[NUM] = LAYOUT_split_3x5_2(
|
[NUM] = LAYOUT_split_3x5_2(
|
||||||
//,--------------------------------------------. ,--------------------------------------------.
|
//,--------------------------------------------. ,--------------------------------------------.
|
||||||
KC_LPRN, KC_7, KC_8, KC_9, KC_RPRN, XXXXXXX, KC_ASTR, KC_PERC, KC_SLSH, XXXXXXX,
|
KC_LPRN, KC_7, KC_8, KC_9, KC_RPRN, XXXXXXX, KC_PLUS, KC_MINS, KC_ASTR, KC_SLSH,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
KC_0, KC_4, KC_5, KC_6, KC_DOT, XXXXXXX, OS_RGUI, OS_RALT, OS_RCTL, OS_RSFT,
|
KC_0, KC_4, KC_5, KC_6, KC_EQL, XXXXXXX, OS_RGUI, OS_RSFT, OS_RALT, XXXXXXX,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
KC_LABK, KC_1, KC_2, KC_3, KC_RABK, XXXXXXX, KC_PLUS, KC_EQL, KC_MINS, XXXXXXX,
|
KC_COMM, KC_1, KC_2, KC_3, KC_DOT, XXXXXXX, OS_RCTL, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
_______, _______, _______, _______
|
_______, _______, _______, _______
|
||||||
//`-----------------' `-----------------'
|
//`-----------------' `-----------------'
|
||||||
|
|
@ -116,9 +116,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
//,--------------------------------------------. ,--------------------------------------------.
|
//,--------------------------------------------. ,--------------------------------------------.
|
||||||
KC_GRV, KC_LABK, KC_MINS, KC_RABK, XXXXXXX, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, KC_PLUS,
|
KC_GRV, KC_LABK, KC_MINS, KC_RABK, XXXXXXX, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, KC_PLUS,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
KC_EXLM, KC_LPRN, KC_EQL, KC_RPRN, KC_HASH, KC_PERC, KC_LCBR, KC_DLR, KC_RCBR, KC_SCLN,
|
KC_PIPE, KC_LPRN, KC_EQL, KC_RPRN, KC_HASH, KC_PERC, KC_LCBR, KC_DLR, KC_RCBR, KC_SCLN,
|
||||||
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------|
|
||||||
KC_PIPE, KC_AMPR, KC_CIRC, KC_AT, XXXXXXX, XXXXXXX, KC_ASTR, _______, _______, _______,
|
KC_EXLM, KC_AMPR, KC_CIRC, KC_AT, XXXXXXX, XXXXXXX, KC_ASTR, _______, _______, _______,
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
_______, _______, _______, _______
|
_______, _______, _______, _______
|
||||||
//`-----------------' `-----------------'
|
//`-----------------' `-----------------'
|
||||||
|
|
@ -148,18 +148,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Caseword:
|
|
||||||
* configure which keys are "word breaking" */
|
|
||||||
|
|
||||||
bool use_default_xcase_separator(uint16_t keycode, const keyrecord_t *record) {
|
|
||||||
switch (keycode) {
|
|
||||||
case KC_A ... KC_Z:
|
|
||||||
case KC_1 ... KC_0:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Repeat key:
|
/* Repeat key:
|
||||||
* configure additional keys */
|
* configure additional keys */
|
||||||
|
|
||||||
|
|
@ -191,21 +179,21 @@ uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
|
||||||
case HRM_R: return KC_L; // "RL" sfb (0.114%)
|
case HRM_R: return KC_L; // "RL" sfb (0.114%)
|
||||||
case KC_U: return KC_I; // "UI" sfb (0.073%)
|
case KC_U: return KC_I; // "UI" sfb (0.073%)
|
||||||
case KC_O: return KC_E; // "OE" sfb (0.060%)
|
case KC_O: return KC_E; // "OE" sfb (0.060%)
|
||||||
case KC_P: return KC_T; // "PT" sfb (0.050%)
|
case KC_P: return HRM_T; // "PT" sfb (0.050%)
|
||||||
case HRM_S: return KC_Y; // "SY" sfb (0.024%)
|
case HRM_S: return KC_Y; // "SY" sfb (0.024%)
|
||||||
case SYM_D: return KC_G; // "DG" sfb (0.021%)
|
case HRM_D: return KC_G; // "DG" sfb (0.021%)
|
||||||
|
|
||||||
// Magic Keycodes
|
// Magic Keycodes
|
||||||
case KC_B: return MG_EFORE;
|
case KC_B: return MG_EFORE;
|
||||||
case HRM_I: return MG_ON;
|
case HRM_I: return MG_ON;
|
||||||
case KC_J: return MG_UST;
|
case HRM_J: return MG_UST;
|
||||||
case KC_M: return MG_ENT;
|
case KC_M: return MG_ENT;
|
||||||
case HRM_N: return MG_ION;
|
case HRM_N: return MG_ION;
|
||||||
case HRM_T: return MG_MENT;
|
case HRM_T: return MG_MENT;
|
||||||
case KC_V: return MG_ER;
|
case KC_V: return MG_ER;
|
||||||
case KC_W: return MG_HICH;
|
case KC_W: return MG_HICH;
|
||||||
case KC_X: return MG_ES;
|
case KC_X: return MG_ES;
|
||||||
case KC_COMM: return MG_BUT;
|
case HRM_COM: return MG_BUT;
|
||||||
case KC_SPC: return MG_THE;
|
case KC_SPC: return MG_THE;
|
||||||
|
|
||||||
// Compound Assignment
|
// Compound Assignment
|
||||||
|
|
@ -229,11 +217,6 @@ uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
|
||||||
* program the behaviour of any keycode */
|
* program the behaviour of any keycode */
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
// Process case modes
|
|
||||||
if (!process_case_modes(keycode, record)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process our custom keys
|
// Process our custom keys
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case NAV_REP:
|
case NAV_REP:
|
||||||
|
|
@ -270,13 +253,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (rep_count > 0) {
|
if (rep_count > 0) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
// Repeat Key Overrides
|
// Repeat Key Overrides
|
||||||
case HRM_A: SEND_STRING(/*a*/ "nd" ); return false; // "and" trigram (3.293%)
|
case KC_A: SEND_STRING(/*a*/ "nd" ); return false; // "and" trigram (3.293%)
|
||||||
case HRM_I: SEND_STRING(/*i*/ "ng" ); return false; // "ing" trigram (3.476%)
|
case HRM_I: SEND_STRING(/*i*/ "ng" ); return false; // "ing" trigram (3.476%)
|
||||||
case KC_Y: SEND_STRING(/*y*/ "ou" ); return false; // "you" trigram (3.492%)
|
case KC_Y: SEND_STRING(/*y*/ "ou" ); return false; // "you" trigram (3.492%)
|
||||||
case HRM_N: SEND_STRING(/*n*/ "f" ); return false; // "nf" sfb (0.036%)
|
case HRM_N: SEND_STRING(/*n*/ "f" ); return false; // "nf" sfb (0.036%)
|
||||||
case KC_B: SEND_STRING(/*b*/ "ecause"); return false; // "because" brief
|
case KC_B: SEND_STRING(/*b*/ "ecause"); return false; // "because" brief
|
||||||
case KC_W: SEND_STRING(/*w*/ "ould" ); return false; // "would" brief
|
case KC_W: SEND_STRING(/*w*/ "ould" ); return false; // "would" brief
|
||||||
case KC_COMM: SEND_STRING(/*,*/ " and" ); return false; // ", and" brief
|
case HRM_COM: SEND_STRING(/*,*/ " and" ); return false; // ", and" brief
|
||||||
case KC_SPC: SEND_STRING(/* */ "for" ); return false; // " for" brief
|
case KC_SPC: SEND_STRING(/* */ "for" ); return false; // " for" brief
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
|
|
@ -295,48 +278,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
// clang-format on
|
// clang-format on
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Leader Key:
|
|
||||||
* hit sequences of keys to trigger custom functionality */
|
|
||||||
|
|
||||||
void leader_end_user() {
|
|
||||||
if (leader_sequence_one_key(KC_ESC)) {
|
|
||||||
layer_clear();
|
|
||||||
|
|
||||||
// enable caps word
|
|
||||||
} else if (leader_sequence_one_key(KC_SPC)) {
|
|
||||||
enable_caps_word();
|
|
||||||
|
|
||||||
// shortcuts
|
|
||||||
} else if (leader_sequence_one_key(KC_Y)) { // yank
|
|
||||||
tap_code16(C(KC_C));
|
|
||||||
} else if (leader_sequence_one_key(KC_P)) { // paste
|
|
||||||
tap_code16(C(KC_V));
|
|
||||||
} else if (leader_sequence_one_key(KC_D)) { // delete
|
|
||||||
tap_code16(C(KC_X));
|
|
||||||
} else if (leader_sequence_one_key(KC_U)) { // undo
|
|
||||||
tap_code16(C(KC_Z));
|
|
||||||
} else if (leader_sequence_one_key(KC_W)) { // write
|
|
||||||
tap_code16(C(KC_S));
|
|
||||||
|
|
||||||
// casemodes
|
|
||||||
} else if (leader_sequence_one_key(KC_C)) { // camelCase
|
|
||||||
enable_xcase_with(OSM(MOD_LSFT));
|
|
||||||
} else if (leader_sequence_one_key(KC_S)) { // snake_case
|
|
||||||
enable_xcase_with(KC_UNDS);
|
|
||||||
} else if (leader_sequence_one_key(KC_K)) { // kebab-case
|
|
||||||
enable_xcase_with(KC_MINS);
|
|
||||||
} else if (leader_sequence_one_key(KC_M)) { // MACRO_CASE
|
|
||||||
enable_caps_word();
|
|
||||||
enable_xcase_with(KC_UNDS);
|
|
||||||
|
|
||||||
// toggle layers
|
|
||||||
} else if (leader_sequence_two_keys(KC_L, KC_E)) { // e for extend as n for num is taken
|
|
||||||
layer_on(NAV);
|
|
||||||
} else if (leader_sequence_two_keys(KC_L, KC_N)) {
|
|
||||||
layer_on(NUM);
|
|
||||||
} else if (leader_sequence_two_keys(KC_L, KC_S)) {
|
|
||||||
layer_on(SYM);
|
|
||||||
} else if (leader_sequence_two_keys(KC_L, KC_F)) {
|
|
||||||
layer_on(FUN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,11 @@ LTO_ENABLE = yes
|
||||||
|
|
||||||
# Software features
|
# Software features
|
||||||
AUTOCORRECT_ENABLE = yes
|
AUTOCORRECT_ENABLE = yes
|
||||||
|
CAPS_WORD_ENABLE = yes
|
||||||
COMBO_ENABLE = yes
|
COMBO_ENABLE = yes
|
||||||
REPEAT_KEY_ENABLE = yes
|
REPEAT_KEY_ENABLE = yes
|
||||||
LEADER_ENABLE = yes
|
|
||||||
|
|
||||||
# Combo dictionary
|
# Combo dictionary
|
||||||
ifeq ($(COMBO_ENABLE),yes)
|
ifeq ($(COMBO_ENABLE),yes)
|
||||||
VPATH += keyboards/gboards
|
VPATH += keyboards/gboards
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable casemode
|
|
||||||
SRC += features/casemodes.c
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue