keymap.c (607B)
1 // Copyright 2022 Markus Knutsson (@TweetyDaBird) 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 }; 10 11 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 12 13 [_BASE] = LAYOUT( 14 KC_MPLY, 15 UG_NEXT, UG_VALU, UG_TOGG, 16 KC_MPRV, KC_MPLY, KC_MNXT 17 18 ) 19 }; 20 21 bool encoder_update_user(uint8_t index, bool clockwise) { 22 if (index == 0) { 23 if (clockwise) { 24 tap_code(KC_VOLU); 25 } else { 26 tap_code(KC_VOLD); 27 } 28 } 29 return false; 30 }