2022-09-30 09:01:33 +06:00
|
|
|
// Copyright 2022 Markus Knutsson (@TweetyDaBird)
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
|
|
|
|
// Defines names for use in layer keycodes and the keymap
|
|
|
|
enum layer_names {
|
|
|
|
_BASE
|
|
|
|
};
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
|
|
|
[_BASE] = LAYOUT(
|
|
|
|
KC_MPLY,
|
2024-08-25 18:15:07 +06:00
|
|
|
UG_NEXT, UG_VALU, UG_TOGG,
|
2022-09-30 09:01:33 +06:00
|
|
|
KC_MPRV, KC_MPLY, KC_MNXT
|
|
|
|
|
|
|
|
)
|
|
|
|
};
|
|
|
|
|
|
|
|
bool encoder_update_user(uint8_t index, bool clockwise) {
|
|
|
|
if (index == 0) {
|
|
|
|
if (clockwise) {
|
|
|
|
tap_code(KC_VOLU);
|
|
|
|
} else {
|
|
|
|
tap_code(KC_VOLD);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|