keymap.c (2774B)
1 /* Copyright 2022 DOIO 2 * Copyright 2022 DOIO2022 <https://github.com/DOIO2022> 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #include QMK_KEYBOARD_H 19 20 enum layer_names { 21 _LAY0, 22 _LAY1, 23 _LAY2 24 }; 25 26 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 27 28 [_LAY0] = LAYOUT( 29 TO(1), RM_NEXT, RM_TOGG, RM_HUEU, RM_VALD, RM_VALU, 30 KC_MPLY, KC_UP, KC_UP, 31 KC_MNXT, KC_TRNS, KC_MPRV, A(KC_LEFT), KC_TRNS, A(KC_RIGHT), KC_RIGHT, KC_TRNS, KC_LEFT, 32 KC_MPLY, KC_DOWN, KC_DOWN), 33 [_LAY1] = LAYOUT( 34 TO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 35 MS_WHLU, S(KC_RBRC), C(KC_L), 36 C(MS_WHLD), KC_TRNS, C(MS_WHLU), KC_DOT, KC_TRNS, KC_COMM, C(KC_B), KC_TRNS, C(KC_U), 37 MS_WHLD, S(KC_LBRC), C(KC_M)), 38 [_LAY2] = LAYOUT( 39 TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 40 KC_B, KC_UP, S(KC_I), 41 KC_P, KC_TRNS, KC_H, KC_RIGHT, KC_TRNS, KC_LEFT, KC_O, KC_TRNS, KC_I, 42 KC_Y, KC_DOWN, S(KC_O)) 43 }; 44 45 #ifdef ENCODER_MAP_ENABLE 46 const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { 47 [_LAY0] = { ENCODER_CCW_CW(C(KC_DOWN), C(KC_UP)), ENCODER_CCW_CW(C(KC_PMNS), C(KC_PPLS)), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, 48 [_LAY1] = { ENCODER_CCW_CW(C(KC_PMNS), C(KC_PPLS)), ENCODER_CCW_CW(KC_LBRC, KC_RBRC), ENCODER_CCW_CW(C(S(KC_U)), C(KC_I)) }, 49 [_LAY2] = { ENCODER_CCW_CW(KC_C, KC_V), ENCODER_CCW_CW(KC_MINS, KC_EQL), ENCODER_CCW_CW(KC_J, KC_L) } 50 }; 51 #endif