mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-01-10 11:39:32 +00:00
c8fe565ee6
* Add Halcyon Kyria Rev4 * Remove bootmagic and unused features * Fix encoderindex * Update readme.md * Remove rgblight * Implement requested changes * Add encoder update user * Remove rules.mk and add VIK configuration * Move options to config.h * Update RGB keycodes (qmk#24484) * implement changes --------- Co-authored-by: harvey-splitkb <126267034+harvey-splitkb@users.noreply.github.com>
29 lines
643 B
C
29 lines
643 B
C
// Copyright 2024 splitkb.com (support@splitkb.com)
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "quantum.h"
|
|
|
|
#ifdef ENCODER_ENABLE
|
|
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|
if (!encoder_update_user(index, clockwise)) {
|
|
return false;
|
|
}
|
|
if (index == 0) {
|
|
// Volume control
|
|
if (clockwise) {
|
|
tap_code(KC_VOLU);
|
|
} else {
|
|
tap_code(KC_VOLD);
|
|
}
|
|
} else if (index == 1) {
|
|
// Page up/Page down
|
|
if (clockwise) {
|
|
tap_code(KC_PGDN);
|
|
} else {
|
|
tap_code(KC_PGUP);
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
#endif
|