Skip to content

Instantly share code, notes, and snippets.

@Ga68
Created December 18, 2021 13:27
Show Gist options
  • Save Ga68/90f270bbe0293ccfd481edbd98ed0347 to your computer and use it in GitHub Desktop.
Save Ga68/90f270bbe0293ccfd481edbd98ed0347 to your computer and use it in GitHub Desktop.
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
if (get_mods() & (MOD_MASK_CTRL)) {
tap_code16(C(KC_TAB));
} else {
tap_code(KC_VOLU);
}
} else {
if (get_mods() & (MOD_MASK_CTRL)) {
tap_code16(C(S(KC_TAB)));
} else {
tap_code(KC_VOLD);
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment