qmk-keychron-q3-colemak-dh/keyboards/dumbpad/v1x_right/templates/keymap.c
Drashna Jaelre a0fed0ea17
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2021-05-21 23:17:32 -07:00

27 lines
671 B
C

#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
if (clockwise) {
tap_code(KC_MS_R);
} else {
tap_code(KC_MS_L);
}
break;
default:
if (clockwise) {
tap_code(KC_EQL);
} else {
tap_code(KC_MINS);
}
break;
}
}
return true;
}