keymap.c (1150B)
1 /* 2 Copyright 2021 CapsUnlocked 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 #include QMK_KEYBOARD_H 18 19 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 20 [0] = LAYOUT( 21 MO(1), 22 KC_1, KC_2, KC_3, 23 KC_4, KC_5, KC_6 24 ), 25 [1] = LAYOUT( 26 _______, 27 UG_NEXT, KC_UP, QK_BOOT, 28 KC_LEFT, KC_DOWN, KC_RGHT 29 ), 30 }; 31 32 // Volume up/down on the encoder 33 bool encoder_update_user(uint8_t index, bool clockwise) { 34 if (clockwise) { 35 tap_code_delay(KC_VOLU, 10); 36 } 37 else { 38 tap_code_delay(KC_VOLD, 10); 39 } 40 41 return true; 42 }