leader key looks fun

This commit is contained in:
Cadey Ratio 2020-10-03 13:50:30 -04:00
parent 44be9e2e23
commit 7f3a41108f
5 changed files with 81 additions and 46 deletions

View File

@ -1,40 +1,8 @@
// Programming
SUBS(ifErr, "if err != nil {\n\t\n}", KC_E, KC_I)
SUBS(goTest, "go test ./...\n", KC_G, KC_T)
SUBS(cargoTest, "cargo test\n", KC_C, KC_T)
// 1c project names // 1c project names
SUBS(kumo, "kumo ", KC_K, KC_M) //SUBS(kumo, "kumo ", KC_K, KC_M)
SUBS(gaia, "gaia ", KC_G, KC_A) //SUBS(gaia, "gaia ", KC_G, KC_A)
SUBS(leeroy, "leeroy ", KC_L, KC_R) //SUBS(leeroy, "leeroy ", KC_L, KC_R)
SUBS(jinn, "jinn ", KC_J, KC_I) //SUBS(jinn, "jinn ", KC_J, KC_I)
// proxy tags
SUBS(cadey, "Cadey\\ ", KC_C, KC_A)
SUBS(nicole, "Nicole\\ ", KC_N, KC_I)
SUBS(jessie, "Jessie\\ ", KC_J, KC_E)
SUBS(ashe, "Ashe\\ ", KC_A, KC_S)
SUBS(sephie, "Sephie\\ ", KC_S, KC_E)
SUBS(mai, "Mai\\ ", KC_M, KC_A)
// Helpers for Kubernetes
SUBS(kyGetDepl, "kubectl get deployments ", KC_K, KC_Y)
SUBS(kuGetVer, "kubectl version ", KC_K, KC_U)
SUBS(kiExec, "kubectl exec -it ", KC_K, KC_I)
SUBS(koDesc, "kubectl describe ", KC_K, KC_O)
SUBS(kpGetPods, "kubectl get pods ", KC_K, KC_P)
SUBS(knGetNodes, "kubectl get nodes -o wide ", KC_K, KC_N)
SUBS(kmLogs, "kubectl logs ", KC_K, KC_M)
SUBS(kConfig, "kubectl logs ", KC_K, KC_COMM)
// pastas
SUBS(
nonbinary,
"Non-binary gender identity is just one term used to describe individuals who may experience a gender identity that is neither exclusively male or female or is in between or beyond both genders. Non-binary individuals may identify as gender fluid, agender (without gender), third gender, or something else entirely.",
KC_E,
KC_B
)
SUBS(breatheManually, "this sentence makes you breathe manually", KC_B, KC_M)
// Vim-Mode combos // Vim-Mode combos
COMB(weEsc, KC_ESC, KC_W, KC_F) COMB(weEsc, KC_ESC, KC_W, KC_F)

View File

@ -5,6 +5,8 @@
#define ORYX_CONFIGURATOR #define ORYX_CONFIGURATOR
#define FIRMWARE_VERSION u8"xbJXx/Gw3K3" #define FIRMWARE_VERSION u8"xbJXx/Gw3K3"
#define RGB_MATRIX_STARTUP_SPD 60 #define RGB_MATRIX_STARTUP_SPD 60
#define LEADER_TIMEOUT 100
#define LEADER_PER_KEY_TIMING
#define COMBO_COUNT 1 #define COMBO_COUNT 1
#define COMBO_TERM 50 #define COMBO_TERM 50
#define COMBO_ALLOW_ACTION_KEYS #define COMBO_ALLOW_ACTION_KEYS

View File

@ -1,8 +1,8 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "config.h" #include "config.h"
#include "version.h" #include "version.h"
#include "g/keymap_combo.h"
#include "keymap_steno.h" #include "keymap_steno.h"
#include "g/keymap_combo.h"
#include "music.h" #include "music.h"
#define KC_MAC_UNDO LGUI(KC_Z) #define KC_MAC_UNDO LGUI(KC_Z)
@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_DELETE, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(4), TG(2), KC_J, KC_L, KC_U, KC_Y, KC_SCOLON, KC_BSLASH, KC_DELETE, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(4), TG(2), KC_J, KC_L, KC_U, KC_Y, KC_SCOLON, KC_BSLASH,
KC_ESCAPE, KC_A, KC_R, KC_S, KC_T, KC_D, TG(1), TG(5), KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, KC_ESCAPE, KC_A, KC_R, KC_S, KC_T, KC_D, TG(1), TG(5), KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOTE,
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPC, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPC,
LT(3,KC_GRAVE), LCTL_T(KC_NO), LALT(KC_LSHIFT),KC_LEFT, KC_RIGHT, KC_LALT, RCTL_T(KC_ESCAPE), KC_UP, KC_DOWN, KC_LBRACKET, KC_RBRACKET, MO(3), LT(3,KC_GRAVE), KC_LCTRL, LALT(KC_LSHIFT),KC_LEFT, KC_RIGHT, LALT_T(KC_LEAD), RCTL_T(KC_ESCAPE), KC_UP, KC_DOWN, KC_LBRACKET, KC_RBRACKET, MO(3),
KC_SPACE, KC_BSPACE, KC_LGUI, KC_SPACE, KC_BSPACE, KC_LGUI,
KC_COLON, KC_TAB, KC_ENTER KC_COLON, KC_TAB, KC_ENTER
), ),
@ -442,30 +442,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void matrix_init_user() { void matrix_init_user() {
steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
autoshift_enable();
} }
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) { switch (get_highest_layer(state)) {
case COLEMAK: case COLEMAK:
autoshift_enable();
break; break;
case QWERTY: case QWERTY:
autoshift_disable();
break; break;
case DVORAK: case DVORAK:
autoshift_enable();
break; break;
case SYMNUM: case SYMNUM:
autoshift_disable();
break; break;
case MEDIA: case MEDIA:
autoshift_disable();
break; break;
case DWM: case DWM:
autoshift_disable();
break; break;
case STENO: case STENO:
autoshift_disable();
PLAY_SONG(sonic_ring); PLAY_SONG(sonic_ring);
break; break;
} }

70
moonlander/leader.c Normal file
View File

@ -0,0 +1,70 @@
#include QMK_KEYBOARD_H
#include "config.h"
#include "version.h"
extern void combo_enable(void);
extern void combo_disable(void);
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
// Proxytags
SEQ_TWO_KEYS(KC_P, KC_C) { SEND_STRING("Cadey\\ "); }
SEQ_TWO_KEYS(KC_P, KC_N) { SEND_STRING("Nicole\\ "); }
SEQ_TWO_KEYS(KC_P, KC_J) { SEND_STRING("Jessie\\ "); }
SEQ_TWO_KEYS(KC_P, KC_A) { SEND_STRING("Ashe\\ "); }
SEQ_TWO_KEYS(KC_P, KC_S) { SEND_STRING("Sephie\\ "); }
SEQ_TWO_KEYS(KC_P, KC_M) { SEND_STRING("Mai\\ "); }
// Combos
SEQ_TWO_KEYS(KC_C, KC_D) { combo_disable(); }
SEQ_TWO_KEYS(KC_C, KC_E) { combo_enable(); }
// Autoshift
SEQ_THREE_KEYS(KC_A, KC_S, KC_T) { autoshift_toggle(); }
SEQ_THREE_KEYS(KC_A, KC_S, KC_E) { autoshift_enable(); }
SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { autoshift_disable(); }
// Go
SEQ_THREE_KEYS(KC_G, KC_I, KC_E) {
SEND_STRING("if err != nil {\n\t\n}");
}
// k8s
SEQ_THREE_KEYS(KC_K, KC_G, KC_D) { SEND_STRING("kubectl get deployments "); }
SEQ_THREE_KEYS(KC_K, KC_G, KC_P) { SEND_STRING("kubectl get pods "); }
SEQ_THREE_KEYS(KC_K, KC_G, KC_N) { SEND_STRING("kubectl get nodes -o wide "); }
SEQ_TWO_KEYS(KC_K, KC_L) { SEND_STRING("kubectl logs "); }
SEQ_THREE_KEYS(KC_K, KC_L, KC_D) { SEND_STRING("kubectl logs deployment/"); }
SEQ_TWO_KEYS(KC_K, KC_V) { SEND_STRING("kubectl version "); }
SEQ_TWO_KEYS(KC_K, KC_I) { SEND_STRING("kubectl exec -it "); }
SEQ_TWO_KEYS(KC_K, KC_D) { SEND_STRING("kubectl describe "); }
// Git
SEQ_TWO_KEYS(KC_G, KC_P) { SEND_STRING("git push"); }
SEQ_THREE_KEYS(KC_G, KC_F, KC_P) { SEND_STRING("git push --force-with-lease"); }
SEQ_TWO_KEYS(KC_G, KC_U) { SEND_STRING("git pull"); }
SEQ_TWO_KEYS(KC_G, KC_A) { SEND_STRING("git add ."); }
SEQ_TWO_KEYS(KC_G, KC_D) { SEND_STRING("git diff"); }
SEQ_THREE_KEYS(KC_G, KC_D, KC_S) { SEND_STRING("git diff --staged"); }
SEQ_TWO_KEYS(KC_G, KC_L) { SEND_STRING("git log"); }
SEQ_THREE_KEYS(KC_G, KC_L, KC_O) { SEND_STRING("git log --oneline"); }
SEQ_TWO_KEYS(KC_G, KC_O) { SEND_STRING("git checkout"); }
SEQ_THREE_KEYS(KC_G, KC_O, KC_B) { SEND_STRING("git checkout -b"); }
SEQ_TWO_KEYS(KC_G, KC_S) { SEND_STRING("git status"); }
SEQ_TWO_KEYS(KC_G, KC_C) { SEND_STRING("git commit -m ''"); }
SEQ_THREE_KEYS(KC_G, KC_C, KC_A) { SEND_STRING("git commit --amend"); }
// copypastas
SEQ_THREE_KEYS(KC_P, KC_N, KC_B) {
SEND_STRING("Non-binary gender identity is just one term used to describe individuals who may experience a gender identity that is neither exclusively male or female or is in between or beyond both genders. Non-binary individuals may identify as gender fluid, agender (without gender), third gender, or something else entirely.");
}
SEQ_THREE_KEYS(KC_P, KC_B, KC_M) {
SEND_STRING("this sentence makes you breathe manually");
}
}
}

View File

@ -4,7 +4,7 @@ COMMAND_ENABLE = no
WEBUSB_ENABLE = yes WEBUSB_ENABLE = yes
ORYX_ENABLE = yes ORYX_ENABLE = yes
DYNAMIC_MACRO_ENABLE = yes DYNAMIC_MACRO_ENABLE = yes
SRC = matrix.c SRC = matrix.c leader.c
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = no
RGB_MATRIX_ENABLE = yes RGB_MATRIX_ENABLE = yes
COMBO_ENABLE = yes COMBO_ENABLE = yes
@ -12,3 +12,4 @@ VPATH += keyboards/gboards/
WPM_ENABLE = yes WPM_ENABLE = yes
STENO_ENABLE = yes STENO_ENABLE = yes
AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_ENABLE = yes
LEADER_ENABLE = yes