#include QMK_KEYBOARD_H
#include "layers.h"
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case WORKMAN:
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
break;
case SYMBOLS:
case FN:
tap_code(KC_PGDN);
tap_code(KC_PGUP);
case NAV:
case RNAV:
default:
tap_code16(C(A(KC_RIGHT)));
tap_code16(C(A(KC_LEFT)));
} else if (index == 1) {
tap_code(KC_BRIU);
tap_code(KC_BRID);
tap_code16(C(KC_RIGHT));
tap_code16(C(KC_LEFT));
tap_code16(C(KC_TAB));
tap_code16(C(S(KC_TAB)));
return true;
#endif