2020-02-05 02:56:50 +01:00
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
|
|
|
/* LAYER 0
|
|
|
|
* ,-----------------------.
|
|
|
|
* | << | MUTE | >> | ENCODER - PRESS (MUTE) / KNOB (Brush size)
|
|
|
|
* |-------+-------+-------|
|
2021-05-22 08:17:32 +02:00
|
|
|
* | STOP | PLAY | MEDIA |
|
2020-02-05 02:56:50 +01:00
|
|
|
* |-------+-------+-------|
|
2021-05-22 08:17:32 +02:00
|
|
|
* | CALC | MAIL | PC/FN |
|
2020-02-05 02:56:50 +01:00
|
|
|
* `-----------------------'
|
|
|
|
*/
|
|
|
|
[0] = LAYOUT(
|
|
|
|
KC_MPRV, KC_MUTE, KC_MNXT,
|
|
|
|
KC_MSTP, KC_MPLY, KC_MSEL,
|
|
|
|
KC_CALC, KC_MAIL, LT(1, KC_MYCM)
|
|
|
|
),
|
|
|
|
|
|
|
|
/* LAYER 1
|
|
|
|
* ,-----------------------.
|
|
|
|
* |BL TOG | | BREATH|
|
|
|
|
* |-------+-------+-------|
|
|
|
|
* | BL + | BL - |BL CYCL|
|
|
|
|
* |-------+-------+-------|
|
|
|
|
* | BL ON | BL OFF| |
|
|
|
|
* `-----------------------'
|
|
|
|
*/
|
|
|
|
[1] = LAYOUT(
|
|
|
|
BL_TOGG, KC_TRNS, BL_BRTG,
|
|
|
|
BL_INC, BL_DEC, BL_STEP,
|
|
|
|
BL_ON, BL_OFF, KC_TRNS
|
|
|
|
)
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2021-05-22 08:17:32 +02:00
|
|
|
bool encoder_update_user(uint8_t index, bool clockwise) {
|
2020-02-05 02:56:50 +01:00
|
|
|
if (index == 0) { /* First encoder */
|
|
|
|
if (clockwise) {
|
|
|
|
tap_code(KC_RBRC);
|
|
|
|
} else {
|
|
|
|
tap_code(KC_LBRC);
|
|
|
|
}
|
2021-05-22 08:17:32 +02:00
|
|
|
} else if (index == 1) { /* Second encoder */
|
2020-02-05 02:56:50 +01:00
|
|
|
if (clockwise) {
|
|
|
|
tap_code(KC_RBRC);
|
|
|
|
} else {
|
|
|
|
tap_code(KC_LBRC);
|
|
|
|
}
|
|
|
|
}
|
2021-05-22 08:17:32 +02:00
|
|
|
return true;
|
|
|
|
}
|