forked from mirrors/qmk_firmware
[Keymap] Feature/extend keymap (#12778)
* Add F13-F24 * Add nvim macros * Add debug switch * Switch mode every time, add debug print
This commit is contained in:
parent
dee50c9cc8
commit
3099630a11
5 changed files with 80 additions and 47 deletions
|
@ -29,11 +29,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC , OSL(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
RV_SNAP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE,
|
||||
RV_SNAP, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_TRNS, KC_MUTE,
|
||||
RV_DEG , RV_SUP1, RV_SUP2, RV_SUP3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_UNEQ, RV_PM , KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RV_EUR , RV_RT , RV_TM , KC_TRNS, RV_UUML, KC_TRNS, RV_OUML, KC_TRNS, KC_TRNS, KC_PEQL, KC_TRNS, KC_VOLD,
|
||||
KC_CAPS, RV_AUML, RV_SZ , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_LOCK, KC_TRNS, KC_PAST, KC_PENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RV_CC , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_PSLS, KC_TRNS, KC_MSTP,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RV_EUR , RV_RT , RV_TM , KC_TRNS, RV_UUML, KC_TRNS, RV_OUML, KC_TRNS, RV_VDEC, RV_VINC, RV_SEQU, KC_VOLD,
|
||||
KC_CAPS, RV_AUML, RV_SZ , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_LOCK, KC_TRNS, RV_SINC, KC_PENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RV_CC , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_SDEC, KC_TRNS, KC_MSTP,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_MPRV, KC_MPLY, KC_MNXT
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
|
@ -45,15 +45,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC , OSL(3) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[3] = LAYOUT(
|
||||
RV_SNAP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE,
|
||||
RV_SNAP, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_TRNS, KC_MUTE,
|
||||
RV_DEG , RV_SUP1, RV_SUP2, RV_SUP3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_UNEQ, RV_PM , KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_LOCK, RV_UUML, KC_TRNS, KC_TRNS, KC_TRNS, KC_PEQL, KC_TRNS, KC_VOLD,
|
||||
KC_CAPS, RV_AUML, RV_RT , RV_SZ , RV_TM , KC_TRNS, KC_TRNS, KC_TRNS, RV_EUR , KC_TRNS, RV_OUML, KC_PAST, KC_PENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RV_CC , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_PSLS, KC_TRNS, KC_MSTP,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_LOCK, RV_UUML, KC_TRNS, KC_TRNS, RV_VDEC, RV_VINC, RV_SEQU, KC_VOLD,
|
||||
KC_CAPS, RV_AUML, RV_RT , RV_SZ , RV_TM , KC_TRNS, KC_TRNS, KC_TRNS, RV_EUR , KC_TRNS, RV_OUML, RV_SINC, KC_PENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RV_CC , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RV_SDEC, KC_TRNS, KC_MSTP,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_MPRV, KC_MPLY, KC_MNXT
|
||||
),
|
||||
[4] = LAYOUT(
|
||||
EEP_RST, RV_SM0 , RV_SM1 , RV_SM2 , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , DF(0) , DF(2) , KC_TRNS, MO(5) ,
|
||||
DEBUG , RV_SM0 , RV_SM1 , RV_SM2 , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , DF(0) , DF(2) , KC_TRNS, MO(5) ,
|
||||
RV_SAYM, RV_SM3 , RV_SM4 , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
|
||||
KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
|
||||
KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
|
||||
|
|
|
@ -87,18 +87,18 @@
|
|||
],
|
||||
[
|
||||
"RV_SNAP",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_F13",
|
||||
"KC_F14",
|
||||
"KC_F15",
|
||||
"KC_F16",
|
||||
"KC_F17",
|
||||
"KC_F18",
|
||||
"KC_F19",
|
||||
"KC_F20",
|
||||
"KC_F21",
|
||||
"KC_F22",
|
||||
"KC_F23",
|
||||
"KC_F24",
|
||||
"KC_TRNS",
|
||||
"KC_MUTE",
|
||||
"RV_DEG",
|
||||
|
@ -127,9 +127,9 @@
|
|||
"KC_TRNS",
|
||||
"RV_OUML",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_PEQL",
|
||||
"KC_TRNS",
|
||||
"RV_VDEC",
|
||||
"RV_VINC",
|
||||
"RV_SEQU",
|
||||
"KC_VOLD",
|
||||
"KC_CAPS",
|
||||
"RV_AUML",
|
||||
|
@ -142,7 +142,7 @@
|
|||
"KC_TRNS",
|
||||
"RV_LOCK",
|
||||
"KC_TRNS",
|
||||
"KC_PAST",
|
||||
"RV_SINC",
|
||||
"KC_PENT",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
|
@ -154,7 +154,7 @@
|
|||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_PDOT",
|
||||
"KC_PSLS",
|
||||
"RV_SDEC",
|
||||
"KC_TRNS",
|
||||
"KC_MSTP",
|
||||
"KC_TRNS",
|
||||
|
@ -251,18 +251,18 @@
|
|||
],
|
||||
[
|
||||
"RV_SNAP",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_F13",
|
||||
"KC_F14",
|
||||
"KC_F15",
|
||||
"KC_F16",
|
||||
"KC_F17",
|
||||
"KC_F18",
|
||||
"KC_F19",
|
||||
"KC_F20",
|
||||
"KC_F21",
|
||||
"KC_F22",
|
||||
"KC_F23",
|
||||
"KC_F24",
|
||||
"KC_TRNS",
|
||||
"KC_MUTE",
|
||||
"RV_DEG",
|
||||
|
@ -291,9 +291,9 @@
|
|||
"RV_UUML",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_PEQL",
|
||||
"KC_TRNS",
|
||||
"RV_VDEC",
|
||||
"RV_VINC",
|
||||
"RV_SEQU",
|
||||
"KC_VOLD",
|
||||
"KC_CAPS",
|
||||
"RV_AUML",
|
||||
|
@ -306,7 +306,7 @@
|
|||
"RV_EUR",
|
||||
"KC_TRNS",
|
||||
"RV_OUML",
|
||||
"KC_PAST",
|
||||
"RV_SINC",
|
||||
"KC_PENT",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
|
@ -318,7 +318,7 @@
|
|||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_PDOT",
|
||||
"KC_PSLS",
|
||||
"RV_SDEC",
|
||||
"KC_TRNS",
|
||||
"KC_MSTP",
|
||||
"KC_TRNS",
|
||||
|
|
|
@ -5,3 +5,5 @@ MOUSEKEY_ENABLE = no
|
|||
LTO_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
UNICODEMAP_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
||||
|
||||
|
|
|
@ -39,9 +39,7 @@ uint8_t get_mode(void) {
|
|||
}
|
||||
|
||||
void set_mode(uint8_t mode, bool save) {
|
||||
if (mode == get_mode()) {
|
||||
return;
|
||||
}
|
||||
dprintf("set_mode - mode: %d, save: %s\n", mode, save ? "true" : "false");
|
||||
switch_mode(mode);
|
||||
|
||||
if (mode > 7) {
|
||||
|
@ -392,6 +390,35 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
send_unicode_string("³");
|
||||
}
|
||||
return false;
|
||||
// vim equal split
|
||||
case RV_SEQU:
|
||||
tap_code16(C(KC_W));
|
||||
tap_code(KC_EQL);
|
||||
return false;
|
||||
// vim vertical split increase
|
||||
case RV_VINC:
|
||||
tap_code16(C(KC_W));
|
||||
tap_code(KC_4);
|
||||
tap_code16(S(KC_DOT));
|
||||
return false;
|
||||
// vim vertical split decrease
|
||||
case RV_VDEC:
|
||||
tap_code16(C(KC_W));
|
||||
tap_code(KC_4);
|
||||
tap_code16(S(KC_COMM));
|
||||
return false;
|
||||
// vim split increase
|
||||
case RV_SINC:
|
||||
tap_code16(C(KC_W));
|
||||
tap_code(KC_4);
|
||||
tap_code16(S(KC_EQL));
|
||||
return false;
|
||||
// vim split decrease
|
||||
case RV_SDEC:
|
||||
tap_code16(C(KC_W));
|
||||
tap_code(KC_4);
|
||||
tap_code(KC_MINS);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -55,7 +55,11 @@ enum userspace_keycodes {
|
|||
RV_SUP1, // ¹
|
||||
RV_SUP2, // ²
|
||||
RV_SUP3, // ³
|
||||
|
||||
RV_VINC, // vim increase vertical split size (<c-w> 4>)
|
||||
RV_VDEC, // vim decrease vertical split size (<c-w> 4<)
|
||||
RV_SINC, // vim increase vertical split size (<c-w> 4+)
|
||||
RV_SDEC, // vim decrease vertical split size (<c-w> 4-)
|
||||
RV_SEQU, // vim equal split size (<c-w> =)
|
||||
};
|
||||
|
||||
typedef union {
|
||||
|
|
Loading…
Reference in a new issue