update keymap
This commit is contained in:
parent
380f38a5f1
commit
3726e366b1
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
BIN
assets/mherkium.png
Normal file
BIN
assets/mherkium.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
|
@ -2,7 +2,19 @@
|
|||
|
||||
//name result 1st chord key 2nd chord key
|
||||
COMB(HA_ESC, KC_ESC, RCTL_T(KC_H), RSFT_T(KC_A))
|
||||
COMB(TS_TAB, KC_TAB, LSFT_T(KC_T), LCTL_T(KC_S))
|
||||
COMB(TA_CAPS, CW_TOGG, LSFT_T(KC_T), RSFT_T(KC_A))
|
||||
COMB(TS_COLN, KC_COLN, LSFT_T(KC_T), LCTL_T(KC_S))
|
||||
COMB(AE_ENT, KC_ENT, RSFT_T(KC_A), RALT_T(KC_E))
|
||||
COMB(RT_TAB, KC_TAB, LALT_T(KC_R), LSFT_T(KC_T))
|
||||
COMB(NR_CAPS, CW_TOGG, LGUI_T(KC_N), LALT_T(KC_R))
|
||||
|
||||
COMB(X, KC_X, KC_W, KC_M)
|
||||
COMB(Q, KC_Q, KC_M, LT(NAV, KC_BSPC))
|
||||
COMB(Z, KC_Z, LT(NUM, KC_SPC), KC_QUOT)
|
||||
COMB(J, KC_J, KC_QUOT, KC_QUES)
|
||||
|
||||
SUBS(HOME, "~/", KC_D, QK_REP)
|
||||
SUBS(UPDIR, "../", QK_AREP, KC_O)
|
||||
|
||||
SUBS(SAVE, SS_TAP(X_ESC)":w"SS_TAP(X_ENT), RCTL_T(KC_H), RSFT_T(KC_A), RALT_T(KC_E))
|
||||
|
||||
/* vim: set filetype=c: */
|
||||
|
|
|
@ -25,9 +25,16 @@ enum layers {
|
|||
|
||||
#include "g/keymap_combo.h" // layer names must be defined before engine include
|
||||
|
||||
#define REPEAT QK_REP
|
||||
#define MAGIC QK_AREP
|
||||
|
||||
enum custom_keycodes {
|
||||
HOME = SAFE_RANGE,
|
||||
UPDIR,
|
||||
MG_OR = SAFE_RANGE,
|
||||
MG_AS,
|
||||
MG_ON,
|
||||
MG_ER,
|
||||
MG_HA,
|
||||
MG_BUT,
|
||||
};
|
||||
|
||||
/* Home Row Mods:
|
||||
|
@ -57,10 +64,10 @@ enum custom_keycodes {
|
|||
/* Mod Tap:
|
||||
* https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap.md */
|
||||
|
||||
#define NAV_W LT(NAV, KC_W)
|
||||
#define NUM_F LT(NUM, KC_F)
|
||||
#define SYM_X LT(SYM, KC_X)
|
||||
#define SYM_ENT LT(SYM, KC_ENT)
|
||||
#define NAV_BAK LT(NAV, KC_BSPC)
|
||||
#define NUM_SPC LT(NUM, KC_SPC)
|
||||
#define SYM_F LT(SYM, KC_F)
|
||||
#define SYM_DOT LT(SYM, KC_DOT)
|
||||
|
||||
// clang-format off
|
||||
|
||||
|
@ -68,11 +75,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
[GALLIUM] = LAYOUT_ortho_3x10(
|
||||
//,-----------------------------------------------------------------------------------------.
|
||||
KC_B, KC_L, KC_D, KC_C, KC_V, KC_J, KC_Y, KC_O, KC_U, QK_REP,
|
||||
KC_B, KC_L, KC_D, REPEAT, KC_V, KC_K, MAGIC, KC_O, KC_U, KC_COMM,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
HRM_N, HRM_R, HRM_T, HRM_S, KC_G, KC_P, HRM_H, HRM_A, HRM_E, HRM_I,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
SYM_X, KC_Q, KC_M, NAV_W, KC_BSPC, KC_SPC, NUM_F, KC_K, KC_Z, SYM_ENT
|
||||
SYM_F, KC_W, KC_M, NAV_BAK, KC_C, KC_Y, NUM_SPC, KC_QUOT, KC_QUES, SYM_DOT
|
||||
//`-----------------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
|
@ -82,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
OS_LGUI, OS_LALT, OS_LSFT, OS_LCTL, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_SPC, KC_TAB, XXXXXXX, KC_ENT
|
||||
//`-----------------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
|
@ -98,36 +105,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
[SYM] = LAYOUT_ortho_3x10(
|
||||
//,-----------------------------------------------------------------------------------------.
|
||||
KC_GRV, KC_AT, KC_CIRC, KC_AMPR, HOME, UPDIR, KC_ASTR, KC_MINS, KC_EXLM, KC_QUOT,
|
||||
KC_GRV, KC_LABK, KC_RABK, KC_MINS, XXXXXXX, XXXXXXX, KC_PLUS, KC_LBRC, KC_RBRC, KC_UNDS,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_BSLS, KC_LPRN, OS_LSFT, KC_RPRN, KC_PERC, KC_HASH, KC_LBRC, OS_RSFT, KC_RBRC, KC_SCLN,
|
||||
KC_EXLM, KC_LPRN, KC_RPRN, KC_EQL, KC_HASH, KC_PERC, KC_DLR, KC_LCBR, KC_RCBR, KC_SCLN,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_DLR, XXXXXXX, XXXXXXX, KC_EQL, KC_SLSH, KC_COMM, KC_DOT
|
||||
KC_COLN, KC_CIRC, KC_AT, KC_DLR, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_BSLS, KC_PIPE
|
||||
//`-----------------------------------------------------------------------------------------'
|
||||
),
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
/* Custom keycodes:
|
||||
* Program the behaviour of any keycode */
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case HOME:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("~/");
|
||||
}
|
||||
return false;
|
||||
case UPDIR:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("../");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Repeat key:
|
||||
* Configure additional keys to be ignored */
|
||||
|
||||
|
@ -142,3 +130,60 @@ bool remember_last_key_user(uint16_t keycode, keyrecord_t *record, uint8_t *reme
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Alternate repeat key:
|
||||
* dynamically adjust output based on the most recent previous keycode */
|
||||
|
||||
// clang-format off
|
||||
uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
|
||||
switch (keycode) {
|
||||
case HRM_R: return KC_L; // "RL" sfb (0.114%)
|
||||
case KC_G: return KC_S; // "GS" sfb (0.102%)
|
||||
case KC_U: return KC_E; // "UE" sfb (0.090%)
|
||||
case HRM_S: return KC_C; // "SC" sfb (0.084%)
|
||||
case KC_L: return KC_W; // "LW" sfb (0.042%)
|
||||
case KC_O: return KC_A; // "OA" sfb (0.041%)
|
||||
case KC_W: return KC_R; // "WR" sfb (0.040%)
|
||||
case HRM_N: return KC_F; // "NF" sfb (0.036%)
|
||||
case HRM_E: return KC_QUES; // "E?" sfb (0.035%)
|
||||
case KC_C: return KC_D; // "CD" scissor
|
||||
|
||||
// Magic Keycodes
|
||||
case SYM_F: return MG_OR;
|
||||
case HRM_I: return MG_ON;
|
||||
case KC_V: return MG_ER;
|
||||
case HRM_T: return MG_HA;
|
||||
case KC_COMM: return MG_BUT;
|
||||
}
|
||||
return KC_TRNS;
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
/* Custom keycodes:
|
||||
* Program the behaviour of any keycode */
|
||||
|
||||
// clang-format off
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
int rep_count = get_repeat_key_count();
|
||||
switch (keycode) {
|
||||
case MG_OR: SEND_STRING(/*f*/ "or" ); return false; // "for" trigram (1.181%)
|
||||
case MG_ON: SEND_STRING(/*i*/ "on" ); return false; // "ion" trigram (0.851%)
|
||||
case MG_ER: SEND_STRING(/*v*/ "er" ); return false; // "ver" trigram (1.273%)
|
||||
case MG_HA: SEND_STRING(/*t*/ "ha" ); return false; // "tha" trigram (1.864%)
|
||||
case MG_BUT: SEND_STRING(/*,*/ " but"); return false; // ", but" brief
|
||||
}
|
||||
if (rep_count > 0) {
|
||||
switch (keycode) {
|
||||
case HRM_H: SEND_STRING(/*h*/ "y" ); return false; // "HY" sfb (0.050%)
|
||||
case HRM_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 KC_Y: SEND_STRING(/*y*/ "ou" ); return false; // "you" trigram (3.492%)
|
||||
case KC_COMM: SEND_STRING(/*,*/ " and"); return false; // ", and" brief
|
||||
case NUM_SPC: SEND_STRING(/* */ "the" ); return false; // " the" brief
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// clang-format on
|
||||
|
|
Loading…
Reference in a new issue