[Keymap] updating ninjonas userspace (#6903)

* [refactor] updating ninjonas layout blocks and standardized LOWER & ADJUST

* [feat] added new macro M_TERM to open MacOS terminal app

* [feat] introducing mod-tap functionality on keymap

* [fix] fixing oled turning on when it feels like it. thanks @drashna for helping

* [feat] updating OLED to rotate logo 180 degrees

* [feat] updating keymaps to reflect VSCode frequent habits

* [refactor] converting crkbd modifier keys to layer blocks

* [fix(#6903)] converting _delay_ms to wait_ms on launching terminal macro
This commit is contained in:
Jonas Avellana 2019-10-07 11:42:03 -06:00 committed by noroadsleft
parent d0ef139749
commit 2881f53dd4
9 changed files with 105 additions and 50 deletions

View File

@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________QWERTY_L3______________________, _____________________QWERTY_R3______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL
________MOD_LEFT_________, ________MOD_RIGHT________
//`---------------------' `---------------------'
),
@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________DVORAK_L3______________________, _____________________DVORAK_R3______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL
________MOD_LEFT_________, ________MOD_RIGHT________
//`---------------------' `---------------------'
),
@ -34,17 +34,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________COLEMAK_L3_____________________, _____________________COLEMAK_R3_____________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL
________MOD_LEFT_________, ________MOD_RIGHT________
//`---------------------' `---------------------'
),
[_LOWER] = LAYOUT_wrapper(
//,----------------------------------------------------. ,----------------------------------------------------.
M_XXX2, M_XXX3, _________MEDIA_1_________, K_CSCN, _______________NAV_1______________, XXXXXXX, K_MDSH,
_____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX,
_____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
KC_LSFT, M_SHFT, _________MEDIA_3_________, T_LBRC, T_RBRC, KC_M, XXXXXXX, M_CODE, M_XXX1, M_PYNV,
_____________________LOWER_L3_______________________, _____________________LOWER_R3_______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'
@ -64,11 +64,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_wrapper( \
//,----------------------------------------------------. ,----------------------------------------------------.
M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY,
_____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_____________________ADJUST_L3______________________, _____________________ADJUST_R3______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'

View File

@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LEFT, KC_RGHT,
KC_PGUP,
KC_PGDN,
KC_DEL, LT_LOW
MT_DEL, LT_LOW
),
/* DVORAK
@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LEFT, KC_RGHT,
KC_PGUP,
KC_PGDN,
KC_DEL, LT_LOW
MT_DEL, LT_LOW
),
/* COLEMAK
@ -155,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LEFT, KC_RGHT,
KC_PGUP,
KC_PGDN,
KC_DEL, LT_LOW
MT_DEL, LT_LOW
),
/* LOWER

View File

@ -100,9 +100,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_LOWER] = LAYOUT_wrapper( \
_____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, \
M_XXX2, M_XXX3, _________MEDIA_1_________, _______, _______________NAV_1______________, _______, K_MDSH, \
M_XXX4, M_XXX5, _________MEDIA_2_________, _______, _______________NAV_2______________, K_LOCK, _______, \
_______, M_SHFT, _________MEDIA_3_________, _______, _______, _______, _______, KC_M, _______, _______, M_XXX1, M_PYNV, \
_____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, \
_____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, \
_____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________, \
__________________________________, _______, _______, M_CODE, _______ \
),
@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------' '------''--------------------'
*/
[_RAISE] = LAYOUT_wrapper( \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, K_CSCN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
@ -130,9 +130,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* ADJUST
* ,------------------------------------------. ,-----------------------------------------.
* |EEP_RST| | | | | | | | | |COLMAK|DVORAK|QWERTY|
* | | | | | | | | | | | | | |
* |-------+------+------+------+------+------| |------+------+------+------+------+------|
* |M_MAKE | | | | | | | | | | | | |
* |M_MAKE |EEPRST| | | | | | | | |COLMAK|DVORAK|QWERTY|
* |-------+------+------+------+------+------| |------+------+------+------+------+------|
* |M_VRSN |M_MALL| | | | |-------. ,-------| | | | | | |
* |-------+------+------+------+------+------| | | |------+------+------+------+------+------|
@ -143,10 +143,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------' '------''--------------------'
*/
[_ADJUST] = LAYOUT_wrapper( \
EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, \
M_MAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
_____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, \
_____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, \
_____________________ADJUST_L3______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R3______________________,\
__________________________________, __________________________________ \
),
};

View File

@ -61,11 +61,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT_wrapper(
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
M_XXX2, M_XXX3, _________MEDIA_1_________, XXXXXXX, K_CSCN, XXXXXXX, _______________NAV_1______________, XXXXXXX, K_MDSH,
_____________________LOWER_L1_______________________, K_CSCN, XXXXXXX, _____________________LOWER_R1_______________________,
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX, XXXXXXX, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX,
_____________________LOWER_L2_______________________, XXXXXXX, XXXXXXX, _____________________LOWER_R2_______________________,
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
XXXXXXX, M_SHFT, _________MEDIA_3_________, XXXXXXX, _______, _______, XXXXXXX, KC_M, XXXXXXX, XXXXXXX, M_XXX1, M_PYNV,
_____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________,
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
__________________________________, _______, _______, M_CODE, _______
//`---------------------------------------' `---------------------------------------'
@ -85,11 +85,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_wrapper(
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY,
_____________________ADJUST_L1______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R1______________________,
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _____________________XXXXXXX________________________,
_____________________ADJUST_L2______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R2______________________,
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _____________________XXXXXXX________________________,
_____________________ADJUST_L3______________________, _______, _______, _____________________ADJUST_R3______________________,
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
__________________________________, __________________________________
//`---------------------------------------' `---------------------------------------'

View File

@ -19,7 +19,7 @@ See: https://docs.qmk.fm/#/feature_userspace
### [Keys](ninjonas.h#L37)
|Code | Description |
|---|---|
|K_LOCK | MacOS shortcut to execute lock command  + ctrl + Q |
|K_LOCK | MacOS shortcut to execute lock command  + CTRL + Q |
|K_CSCN | MacOS shortcut to copy a portion of the screen to the clipboard |
|K_MDSH | MacOS shortcut to get em-dash `` |
|K_RAPP | MacOS shortcut to switch apps to the right |
@ -34,7 +34,13 @@ See: https://docs.qmk.fm/#/feature_userspace
|LM_LOW | Dedicated key to momentarily toggle to use LOWER layer |
|LM_RAI | Dedicated key to momentarily toggle to use RAISE layer |
### [Layout Blocks](ninjonas.h#L50)
### [Mod-Taps](ninjonas.h#L50)
|Code | Description |
|---|---|
|MT_DEL | Tap for Delete, hold for  + ALT + SHIFT |
|MT_EQL | Tap for =, hold for ALT + SHIFT |
### [Layout Blocks](ninjonas.h#L54)
Predefined keyboard layout templates to speed up configuring split keyboards
|Code | Description |
@ -59,6 +65,7 @@ Predefined keyboard layout templates to speed up configuring split keyboards
|M_VRSN | macro to send QMK version |
|M_SHFT | Sends  + alt + shift to a keycode to activate [ShiftIt](https://github.com/fikovnik/ShiftIt) |
|M_CODE | Opens [Visual Studio Code](https://code.visualstudio.com/) on current directory |
|M_TERM | Launches Spotlight and calls Terminal |
|M_XXX1 to M_XXX5 | Reserved for secret macros see [Secrets](#secrets) |
### [Tap-Dance](tap_dances.h)

View File

@ -47,6 +47,10 @@
#define LT_LOW LT(_LOWER, KC_ENT)
#define LT_RAI LT(_RAISE, KC_SPC)
// Mod-Tap Keys
#define MT_DEL MT(MOD_LGUI | MOD_LALT | MOD_LSFT, KC_DEL)
#define MT_EQL MT(MOD_LALT | MOD_LSFT, KC_EQL)
// Layout blocks
#define _____________________QWERTY_L1______________________ T_TAB, T_Q, T_W, KC_E, KC_R, KC_T
#define _____________________QWERTY_L2______________________ T_ESC, KC_A, KC_S, KC_D, KC_F, KC_G
@ -54,7 +58,7 @@
#define _____________________QWERTY_R1______________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
#define _____________________QWERTY_R2______________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
#define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL
#define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_EQL
#define _____________________DVORAK_L1______________________ T_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
#define _____________________DVORAK_L2______________________ T_ESC, KC_A, KC_O, KC_E, KC_U, KC_I
@ -62,7 +66,7 @@
#define _____________________DVORAK_R1______________________ KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS
#define _____________________DVORAK_R2______________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH
#define _____________________DVORAK_R3______________________ KC_B, KC_M, T_W, KC_V, KC_Z, KC_EQL
#define _____________________DVORAK_R3______________________ KC_B, KC_M, T_W, KC_V, KC_Z, MT_EQL
#define _____________________COLEMAK_L1_____________________ T_TAB, T_Q, T_W, KC_F, KC_P, KC_G
#define _____________________COLEMAK_L2_____________________ T_ESC, KC_A, KC_R, KC_S, KC_T, KC_D
@ -70,7 +74,7 @@
#define _____________________COLEMAK_R1_____________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS
#define _____________________COLEMAK_R2_____________________ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT
#define _____________________COLEMAK_R3_____________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL
#define _____________________COLEMAK_R3_____________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_EQL
#define _____________________NUM_LEFT_______________________ T_GRV, KC_1, KC_2, KC_3, KC_4, KC_5
#define _____________________NUM_RIGHT______________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS
@ -81,8 +85,31 @@
#define _____________________SYM_LEFT_______________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
#define _____________________SYM_RIGHT______________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS
#define ____________________________________________________ _______, _______, _______, _______, _______, _______
#define _____________________XXXXXXX________________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define _____________________LOWER_L1_______________________ M_XXX2, M_XXX3, _________MEDIA_1_________, K_CSCN
#define _____________________LOWER_L2_______________________ M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX
#define _____________________LOWER_L3_______________________ KC_LSFT, M_SHFT, _________MEDIA_3_________, T_LBRC
#define _____________________LOWER_R1_______________________ _______________NAV_1______________, XXXXXXX, K_MDSH
#define _____________________LOWER_R2_______________________ _______________NAV_2______________, K_LOCK, XXXXXXX
#define _____________________LOWER_R3_______________________ T_RBRC, KC_M, M_TERM, M_CODE, M_XXX1, M_PYNV
#define _____________________ADJUST_L1______________________ M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#ifdef RGB_MATRIX_ENABLE
#define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI
#define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD
#else
#define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#endif
#ifdef RGB_MATRIX_ENABLE
#define _____________________ADJUST_R1______________________ RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY
#define _____________________ADJUST_R3______________________ RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#else
#define _____________________ADJUST_R1______________________ XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY
#define _____________________ADJUST_R3______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#endif
#define _____________________ADJUST_R2______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define _______________NAV_1______________ KC_PGUP, KC_HOME, KC_UP, KC_END
#define _______________NAV_2______________ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT
@ -91,14 +118,18 @@
#define _____________MOUSE_2______________ KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U
#define __________________________________ _______, _______, _______, _______
#define _____________XXXXXXX______________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define _________MEDIA_1_________ KC_BRIU, KC_MPLY, KC_MUTE
#define _________MEDIA_2_________ KC_BRID, KC_MFFD, KC__VOLUP
#define _________MEDIA_3_________ XXXXXXX, KC_MRWD, KC__VOLDOWN
#ifdef KEYBOARD_crkbd_rev1
#define ________MOD_LEFT_________ T_GUI, KC_LCTL, LT_RAI
#define ________MOD_RIGHT________ LT_LOW, KC_BSPC, MT_DEL
#else
#define ________MOD_LEFT_________ KC_LALT, T_GUI, KC_LCTL
#define ________MOD_RIGHT________ KC_BSPC, KC_DEL, LM_LOW
#define ________MOD_RIGHT________ KC_BSPC, MT_DEL, LM_LOW
#endif
// Layout wrappers
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)

View File

@ -4,12 +4,19 @@
#ifdef OLED_DRIVER_ENABLE
static uint16_t oled_timer = 0;
static uint32_t oled_timer = 0;
extern uint8_t is_master;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (is_master) {
return OLED_ROTATION_0;
}
return OLED_ROTATION_180;
}
bool process_record_oled(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
oled_timer = timer_read();
oled_timer = timer_read32();
}
return true;
}
@ -64,7 +71,7 @@ static void render_logo(void) {
}
void oled_task_user(void) {
if (timer_elapsed(oled_timer) > 30000) {
if (timer_elapsed32(oled_timer) > 30000) {
oled_off();
return;
}
@ -75,8 +82,8 @@ void oled_task_user(void) {
if (is_master) {
render_status();
} else {
oled_write_P(PSTR("\n"), false);
render_logo();
oled_write_P(PSTR("\n"), false);
oled_scroll_left();
}
}

View File

@ -12,10 +12,6 @@ bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; }
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef OLED_DRIVER_ENABLE
process_record_oled(keycode, record);
#endif
switch (keycode) {
// Sends pyenv to activate 'jira' environment
@ -81,7 +77,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Opens Visual Studio Code on current directory
case M_CODE:
if (record->event.pressed) {
SEND_STRING("code ." SS_TAP(X_ENTER));
SEND_STRING("code .\n");
}
break;
// Opens Terminal
case M_TERM:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI));
wait_ms(250);
SEND_STRING("terminal\n");
}
break;
@ -104,5 +109,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// END: Layer macros
}
return process_record_keymap(keycode, record) && process_record_secrets(keycode, record);
return process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
#ifdef OLED_DRIVER_ENABLE
&& process_record_oled(keycode, record)
#endif
; // Close return
}

View File

@ -14,6 +14,7 @@ enum custom_keycodes {
M_FLSH,
M_VRSN,
M_CODE,
M_TERM,
// Secret Macros
M_XXX1,
M_XXX2,