keymap.c (2062B)
1 // Copyright 2021 jp_smasher (@jp_smasher) 2 // SPDX-License-Identifier: GPL-2.0-or-later 3 4 #include QMK_KEYBOARD_H 5 6 // Defines names for use in layer keycodes and the keymap 7 enum layer_names { 8 _BASE, 9 _L1, 10 _L2 11 }; 12 13 // define layers 14 #define L1 MO(_L1) 15 #define L2 LT(_L2, KC_ENT) 16 17 // define home-row styled alpha-mods 18 #define C_C LCTL_T(KC_C) 19 #define C_COMM LCTL_T(KC_COMM) 20 #define G_A CMD_T(KC_A) 21 #define G_SC CMD_T(KC_SCLN) 22 #define A_X LOPT_T(KC_X) 23 #define A_DOT LOPT_T(KC_DOT) 24 #define S_Z SFT_T(KC_Z) 25 #define S_SLSH SFT_T(KC_SLSH) 26 27 // combos for application shortcuts 28 #define SG_LBRC LSG(KC_LBRC) 29 #define SG_RBRC LSG(KC_RBRC) 30 #define G_LBRC G(KC_LBRC) 31 #define G_RBRC G(KC_RBRC) 32 #define A_SLSH A(KC_SLSH) 33 34 /* combos */ 35 const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; 36 combo_t key_combos[] = {COMBO(jk_combo, KC_ESC)}; 37 38 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 39 /* Base */ 40 [_BASE] = LAYOUT_split_3x5_2( 41 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 42 G_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, G_SC, 43 S_Z, A_X, C_C, KC_V, KC_B, KC_N, KC_M, C_COMM, A_DOT, S_SLSH, 44 L1, KC_SPC, KC_SPC, L2 45 ), 46 47 48 [_L1] = LAYOUT_split_3x5_2( 49 KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, 50 KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_GRV, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, KC_PIPE, 51 _______, _______, _______, KC_TAB, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT, 52 _______, _______, _______, _______ 53 ), 54 55 [_L2] = LAYOUT_split_3x5_2( 56 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 57 _______, _______, _______, _______, KC_DOT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_BSPC, 58 _______, _______, _______, _______, _______, A_SLSH, SG_LBRC, SG_RBRC, G_LBRC, G_RBRC, 59 KC_LALT, KC_LGUI, _______, _______ 60 ), 61 };