shift-enter, angle bracket thumbs and the if err != nil key

This commit is contained in:
Cadey Ratio 2020-11-15 09:52:56 -05:00
parent 2afb2ecf3f
commit a0917658ca
1 changed files with 14 additions and 8 deletions

View File

@ -60,6 +60,7 @@ enum custom_keycodes {
ST_MACRO_33,
ST_MACRO_34,
PRINT_WPM,
IF_ERR_NIL,
};
#define COLEMAK 0
@ -78,14 +79,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT,
MO(3), KC_LCTRL, KC_LALT, KC_LEFT, KC_RIGHT, KC_LEAD, RCTL_T(KC_ESCAPE), KC_UP, KC_DOWN, KC_RGUI, KC_PSCREEN, MO(3),
KC_SPACE, KC_BSPACE, KC_LGUI,
KC_COLON, KC_TAB, KC_ENTER
KC_COLON, KC_TAB, KC_SFTENT
),
[1] = LAYOUT_moonlander(
KC_TRANSPARENT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RIGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
KC_TRANSPARENT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRANSPARENT, KC_TRANSPARENT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
KC_TRANSPARENT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRANSPARENT, KC_TRANSPARENT, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_SPACE,
KC_TRANSPARENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT,
KC_TRANSPARENT, KC_LGUI, KC_LALT, KC_LEFT, KC_RIGHT, KC_TRANSPARENT, KC_TRANSPARENT, KC_UP, KC_DOWN, KC_LBRACKET, KC_RBRACKET, TO(0),
KC_TRANSPARENT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRANSPARENT, KC_TRANSPARENT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRANSPARENT,
KC_TRANSPARENT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRANSPARENT, KC_TRANSPARENT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TRANSPARENT,
KC_TRANSPARENT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRANSPARENT, KC_TRANSPARENT, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_TRANSPARENT,
KC_TRANSPARENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_TRANSPARENT,
KC_TRANSPARENT, KC_LGUI, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT
),
@ -99,11 +100,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT
),
[3] = LAYOUT_moonlander(
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, DYN_REC_STOP, DYN_REC_STOP, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, IF_ERR_NIL, KC_GT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRANSPARENT, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, DYN_REC_START1, DYN_REC_START2, KC_SCROLLLOCK, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
KC_PGUP, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,KC_NUMLOCK, KC_4, KC_5, KC_6, KC_KP_PLUS, KC_MINUS,
KC_PGDOWN, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLASH, KC_TRANSPARENT,
KC_TRANSPARENT, KC_COMMA, KC_LCTRL, KC_LALT, PRINT_WPM, KC_TRANSPARENT, RGB_TOG, KC_RGUI, KC_DOT, KC_0, KC_EQUAL, KC_TRANSPARENT,
KC_TRANSPARENT, KC_COMMA, KC_LCTRL, KC_LALT, PRINT_WPM, KC_LT, KC_GT, KC_RGUI, KC_DOT, KC_0, KC_EQUAL, KC_TRANSPARENT,
RGB_VAD, RGB_VAI, KC_HOME,
KC_END, RGB_HUD, RGB_HUI
),
@ -440,6 +441,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
send_string((const char *)display);
}
return false;
case IF_ERR_NIL:
if (record->event.pressed) {
SEND_STRING("if err != nil {\n\t\n}" SS_TAP(X_UP));
}
return false;
}
return true;
}