#include QMK_KEYBOARD_H
enum layer_names {
_BASE,
_FUNC1,
_VIA1,
_VIA2
};
enum custom_keycodes {
YUSHAURL = SAFE_RANGE
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_MUTE, MO(_FUNC1), RGB_MOD,
S(KC_TAB), KC_UP, KC_TAB,
KC_LEFT, KC_DOWN, KC_RGHT
),
[_FUNC1] = LAYOUT(
RESET, KC_TRNS, RGB_TOG,
KC_HOME, KC_VOLU, KC_END,
KC_MPRV, KC_VOLD, KC_MNXT
),
[_VIA1] = LAYOUT(
YUSHAURL,XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[_VIA2] = LAYOUT(
XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case YUSHAURL:
if (record->event.pressed) {
SEND_STRING("https://yushakobo.jp/\n");
} else {
}
break;
}
return true;
}
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
else if (index == 1) { if (clockwise) {
rgblight_decrease_hue_noeeprom();
} else {
rgblight_increase_hue_noeeprom();
}
}
return true;
}