[Keymap] Update personal userspace and keymaps (now with 4 spaces!) (#5774)
* Add FnLk to Melody96 bottom row * Update conditional in userspace makefile Thanks @drashna * Add F keys to Melody96 Fn layer * Add FN_ESC alias to userspace * Update KBD6X keymap * Fix RGB_MATRIX_ENABLE constant name in #if * Remove trailing \ from LAYOUT macro calls * Set RGB mode on EEPROM reset in KBD6X * Swap right and middle mouse buttons in KBD6X * Rearrange RGB controls in KBD6X * Update keycode aliases, replace CLEAR with DEL_NXT in KBD6X Add Clear to KBD6X as RCtrl+` * Convert code to 4 space indents * Tweak RCTRL layer functionality * Replace NUMPAD custom keycode with layer state logic * Update RGB_MATRIX_ENABLE check Co-Authored-By: vomindoraan <vomindoraan@gmail.com>
This commit is contained in:
parent
8a9c90ad78
commit
cb1935aaff
@ -9,15 +9,19 @@ enum layers_keymap {
|
|||||||
L_RCTRL = L_RANGE_KEYMAP,
|
L_RCTRL = L_RANGE_KEYMAP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void eeconfig_init_keymap(void) {
|
||||||
|
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
||||||
|
}
|
||||||
|
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case RCTRL:
|
case RCTRL:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(L_RCTRL);
|
|
||||||
register_code(KC_RCTRL);
|
register_code(KC_RCTRL);
|
||||||
|
layer_on(L_RCTRL);
|
||||||
} else {
|
} else {
|
||||||
layer_off(L_RCTRL);
|
|
||||||
unregister_code(KC_RCTRL);
|
unregister_code(KC_RCTRL);
|
||||||
|
layer_off(L_RCTRL);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -52,41 +56,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
* │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│
|
* │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
|
||||||
* │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │M2 │M3 │ Del │
|
* │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │M3 │M2 │ Del │
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
* │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │
|
* │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │
|
||||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
||||||
* │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │
|
* │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │
|
||||||
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
||||||
* │DPR│DstNA│ MW↓ │MAcl2│ │
|
* │ │ │ MW↓ │MAcl2│ │
|
||||||
* └───┴─────┴───────────────────────────┴─────┴───┘
|
* └───┴─────┴───────────────────────────┴─────┴───┘
|
||||||
*/
|
*/
|
||||||
[L_FN] = LAYOUT(
|
[L_FN] = LAYOUT(
|
||||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS,
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS,
|
||||||
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL,
|
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN3, KC_BTN2, KC_DEL,
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
||||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______,
|
_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______,
|
||||||
XXXXXXX, DST_P_R, DST_N_A, KC_WH_D, KC_ACL2, _______, XXXXXXX
|
XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX
|
||||||
),
|
),
|
||||||
|
|
||||||
/* RCtrl layer
|
/* RCtrl layer
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Clr│
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
|
||||||
* │ │Top│Mv↑│Btm│PrT│ │ │ │ │ │ │ │ │Clear│
|
* │ │Top│Mv↑│Btm│TPr│ │ │ │ │ │ │ │ │DelNx│
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
* │ │Mv←│Mv↓│Mv→│NxT│ │ │ │ │ │ │ │ │
|
* │ │Mv←│Mv↓│Mv→│TNx│ │ │ │ │ │ │ │ │
|
||||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
* │ │RTg│RV-│RV+│ │ │ │ │ │ │ │ │ │
|
||||||
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
* └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘
|
||||||
* │DtR│DstA │ │ │ │
|
* │DPR│DstNA│ │ │ │
|
||||||
* └───┴─────┴───────────────────────────┴─────┴───┘
|
* └───┴─────┴───────────────────────────┴─────┴───┘
|
||||||
*/
|
*/
|
||||||
[L_RCTRL] = LAYOUT(
|
[L_RCTRL] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR,
|
||||||
_______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR,
|
_______, TOP, MV_UP, BOTTOM, TAB_PRV, _______, _______, _______, _______, _______, _______, _______, _______, DEL_NXT,
|
||||||
_______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, MV_LEFT, MV_DOWN, MV_RGHT, TAB_NXT, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
XXXXXXX, DST_REM, DST_ADD, _______, _______, _______, XXXXXXX
|
XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
BOOTMAGIC_ENABLE = no
|
BOOTMAGIC_ENABLE = no
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = no
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = yes
|
MOUSEKEY_ENABLE = yes
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
UNICODEMAP_ENABLE = yes
|
UNICODEMAP_ENABLE = no
|
||||||
|
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = yes
|
||||||
|
@ -2,17 +2,17 @@
|
|||||||
#include "konstantin.h"
|
#include "konstantin.h"
|
||||||
|
|
||||||
static const hsv_t *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW };
|
static const hsv_t *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW };
|
||||||
static size_t cnum = sizeof colors / sizeof *colors;
|
static const size_t cnum = sizeof colors / sizeof *colors;
|
||||||
static size_t cidx = 0;
|
static size_t cidx = 0;
|
||||||
|
|
||||||
void eeconfig_init_keymap(void) {
|
|
||||||
rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v);
|
|
||||||
}
|
|
||||||
|
|
||||||
enum keycodes_keymap {
|
enum keycodes_keymap {
|
||||||
RGB_SET = RANGE_KEYMAP,
|
RGB_SET = RANGE_KEYMAP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void eeconfig_init_keymap(void) {
|
||||||
|
rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v);
|
||||||
|
}
|
||||||
|
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case RGB_SET:
|
case RGB_SET:
|
||||||
@ -39,40 +39,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │
|
* │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │
|
||||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤
|
||||||
* │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │P1 │P2 │P3 │ │
|
* │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │P1 │P2 │P3 │ │
|
||||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤PEn│
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤PEn│
|
||||||
* │LCtl│LGui│LAlt│ Space │RAlGu│RCtrl│ ← │ ↓ │ → │P0 │P. │ │
|
* │LCtl│LGui│LAlt│ Space │RAG│FnL│RCt│ ← │ ↓ │ → │P0 │P. │ │
|
||||||
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[L_BASE] = LAYOUT( \
|
[L_BASE] = LAYOUT(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_HOME, KC_END, KC_PGUP, KC_PGDN,
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_HOME, KC_END, KC_PGUP, KC_PGDN,
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, XXXXXXX,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, XXXXXXX,
|
||||||
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX,
|
KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, XXXXXXX, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Function layer
|
/* Function layer
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │Sys│SLk│Pau│Brk│Top│Btm│
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │Sys│SLk│Pau│Brk│Top│Btm│
|
||||||
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
|
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │RTg│ ÷ │ × │ − │
|
* │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │RTg│ ÷ │ × │ − │
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤
|
||||||
* │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│RH+│RS+│RV+│ │
|
* │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│RH+│RS+│RV+│ │
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│
|
||||||
* │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │
|
* │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │
|
||||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤
|
||||||
* │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │
|
* │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │
|
||||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤RMP│
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤RMP│
|
||||||
* │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│RM-│RM+│ │
|
* │ │DtPR│DtNA│ MW↓ │ │ │App│Hom│PgD│End│RM-│RM+│ │
|
||||||
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[L_FN] = LAYOUT( \
|
[L_FN] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSR, KC_SLCK, KC_PAUS, KC_BRK, TOP, BOTTOM,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSR, KC_SLCK, KC_PAUS, KC_BRK, TOP, BOTTOM,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS,
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS,
|
||||||
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX,
|
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX,
|
||||||
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET,
|
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET,
|
||||||
_______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX,
|
_______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX,
|
||||||
_______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P
|
_______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -15,12 +15,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* │LCtl│LGui│LAlt│ Space │RAlG│FnLk│ │ ← │ ↓ │ → │
|
* │LCtl│LGui│LAlt│ Space │RAlG│FnLk│ │ ← │ ↓ │ → │
|
||||||
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[L_BASE] = LAYOUT_truefox( \
|
[L_BASE] = LAYOUT_truefox(
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, \
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL,
|
||||||
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
|
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_RSF, KC_UP, KC_PGDN, \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_RSF, KC_UP, KC_PGDN,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Function layer
|
/* Function layer
|
||||||
@ -36,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│
|
* │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│
|
||||||
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[L_FN] = LAYOUT_truefox( \
|
[L_FN] = LAYOUT_truefox(
|
||||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, \
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS,
|
||||||
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \
|
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS,
|
||||||
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \
|
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP,
|
||||||
_______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \
|
_______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM,
|
||||||
_______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \
|
_______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Numpad layer
|
/* Numpad layer
|
||||||
@ -57,11 +57,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* │ │ │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │ │ │
|
||||||
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
[L_NUMPAD] = LAYOUT_truefox( \
|
[L_NUMPAD] = LAYOUT_truefox(
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, NUMPAD, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, NUMPAD, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, KC_PENT, _______, \
|
_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, KC_PENT, _______,
|
||||||
_______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, _______, \
|
_______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -31,16 +31,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LAYER_NUMPAD
|
|
||||||
void toggle_numpad(void) {
|
|
||||||
layer_invert(L_NUMPAD);
|
|
||||||
bool numpad = IS_LAYER_ON(L_NUMPAD), num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
|
|
||||||
if (num_lock != numpad) {
|
|
||||||
tap_code(KC_NLCK); // Toggle Num Lock to match layer state
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case CLEAR:
|
case CLEAR:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
@ -70,19 +60,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LAYER_NUMPAD
|
|
||||||
case NUMPAD:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
toggle_numpad();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case KC_ESC:
|
case KC_ESC:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef LAYER_NUMPAD
|
#ifdef LAYER_NUMPAD // Disable Numpad layer before Fn layer
|
||||||
if (IS_LAYER_ON(L_NUMPAD)) {
|
if (IS_LAYER_ON(L_NUMPAD)) {
|
||||||
toggle_numpad();
|
layer_off(L_NUMPAD);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -106,5 +88,15 @@ uint32_t layer_state_set_keymap(uint32_t state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t layer_state_set_user(uint32_t state) {
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
return layer_state_set_keymap(state);
|
state = layer_state_set_keymap(state);
|
||||||
|
|
||||||
|
#ifdef LAYER_NUMPAD
|
||||||
|
bool numpad = state & 1UL<<L_NUMPAD;
|
||||||
|
bool num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
|
||||||
|
if (numpad != num_lock) {
|
||||||
|
tap_code(KC_NLCK); // Toggle Num Lock to match Numpad layer state
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#if defined(RGBLIGHT_ENABLE) || defined(RGBMATRIX_ENABLE)
|
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||||
#include "rgb.h"
|
#include "rgb.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
@ -14,9 +14,14 @@
|
|||||||
#ifdef LAYER_FN
|
#ifdef LAYER_FN
|
||||||
#define FN MO(L_FN)
|
#define FN MO(L_FN)
|
||||||
#define FN_CAPS LT(L_FN, KC_CAPS)
|
#define FN_CAPS LT(L_FN, KC_CAPS)
|
||||||
|
#define FN_ESC LT(L_FN, KC_ESC)
|
||||||
#define FN_FNLK TT(L_FN)
|
#define FN_FNLK TT(L_FN)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LAYER_NUMPAD
|
||||||
|
#define NUMPAD TG(L_NUMPAD)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define KC_SYSR LALT(KC_PSCR)
|
#define KC_SYSR LALT(KC_PSCR)
|
||||||
#undef KC_BRK
|
#undef KC_BRK
|
||||||
#define KC_BRK LCTL(KC_PAUS)
|
#define KC_BRK LCTL(KC_PAUS)
|
||||||
@ -27,15 +32,17 @@
|
|||||||
#define MV_RGHT LCTL(KC_RGHT)
|
#define MV_RGHT LCTL(KC_RGHT)
|
||||||
#define TOP LCTL(KC_HOME)
|
#define TOP LCTL(KC_HOME)
|
||||||
#define BOTTOM LCTL(KC_END)
|
#define BOTTOM LCTL(KC_END)
|
||||||
#define PRV_TAB LCTL(KC_PGUP)
|
#define TAB_PRV LCTL(KC_PGUP)
|
||||||
#define NXT_TAB LCTL(KC_PGDN)
|
#define TAB_NXT LCTL(KC_PGDN)
|
||||||
|
#define DEL_PRV LCTL(KC_BSPC)
|
||||||
|
#define DEL_NXT LCTL(KC_DEL)
|
||||||
|
|
||||||
#define DST_ADD LCTL(LGUI(KC_D))
|
#define DST_ADD LCTL(LGUI(KC_D))
|
||||||
#define DST_REM LCTL(LGUI(KC_F4))
|
#define DST_REM LCTL(LGUI(KC_F4))
|
||||||
#define DST_PRV LCTL(LGUI(KC_LEFT))
|
#define DST_PRV LCTL(LGUI(KC_LEFT))
|
||||||
#define DST_NXT LCTL(LGUI(KC_RGHT))
|
#define DST_NXT LCTL(LGUI(KC_RGHT))
|
||||||
#ifndef DST_MOD_MASK
|
#ifndef DST_MOD_MASK
|
||||||
#define DST_MOD_MASK MOD_MASK_CTRL
|
#define DST_MOD_MASK MOD_MASK_SHIFT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LCT_CPS LCTL_T(KC_CAPS)
|
#define LCT_CPS LCTL_T(KC_CAPS)
|
||||||
@ -54,9 +61,6 @@ enum keycodes_user {
|
|||||||
CLEAR = SAFE_RANGE,
|
CLEAR = SAFE_RANGE,
|
||||||
DST_P_R,
|
DST_P_R,
|
||||||
DST_N_A,
|
DST_N_A,
|
||||||
#ifdef LAYER_NUMPAD
|
|
||||||
NUMPAD,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RANGE_KEYMAP,
|
RANGE_KEYMAP,
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
SRC += konstantin.c
|
SRC += konstantin.c
|
||||||
ifneq (,$(filter yes,$(RGBLIGHT_ENABLE) $(RGB_MATRIX_ENABLE))) # if either is yes
|
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||||
|
SRC += rgb.c
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
|
||||||
SRC += rgb.c
|
SRC += rgb.c
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||||
SRC += tap_dance.c
|
SRC += tap_dance.c
|
||||||
endif
|
endif
|
||||||
ifneq (,$(filter yes,$(UNICODE_ENABLE) $(UNICODEMAP_ENABLE))) # if either is yes
|
ifneq (,$(filter yes,$(UNICODE_ENABLE) $(UNICODEMAP_ENABLE)))
|
||||||
SRC += unicode.c
|
SRC += unicode.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user