mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-15 22:23:21 +00:00
050472a4d0
Co-authored-by: Drashna Jaelre <drashna@live.com>
66 lines
2.3 KiB
Modula-2
66 lines
2.3 KiB
Modula-2
// Layer/none, encoder index 0/1, CW_KC, CCW_KC, Qualifying mod or none
|
|
// LAYER_NONE and MOD_NONE for a single use.
|
|
// LEFT and RIGHT for index. 0 and 1...
|
|
|
|
// default encoders, all layers no mods.
|
|
ENCODER_ACTION(LAYER_NONE, RIGHT, KC_PGDN, KC_PGUP, MOD_NONE)
|
|
ENCODER_ACTION(LAYER_NONE, LEFT, KC_DOWN, KC_UP, MOD_NONE)
|
|
ENCODER_ACTION(LAYER_NONE, LEFT, KC_PGDN, KC_PGUP, MOD_LSFT)
|
|
|
|
// Symbol layer encoders.
|
|
// left and right.
|
|
ENCODER_ACTION(_SYMB_EN, LEFT, KC_LEFT, KC_RIGHT, MOD_NONE)
|
|
// word left or right.
|
|
ENCODER_ACTION(_SYMB_EN, LEFT, LCTL(KC_LEFT), LCTL(KC_RIGHT), MOD_NONE)
|
|
|
|
// Nav layer encoders.
|
|
ENCODER_ACTION(_NAV, LEFT, KC_TAB, S(KC_TAB), MOD_NONE)
|
|
ENCODER_ACTION(_NAV, RIGHT, A(KC_TAB), A(S(KC_TAB)), MOD_NONE)
|
|
ENCODER_ACTION(_NAV, RIGHT, KC_VOLU, KC_VOLD, MOD_NONE)
|
|
|
|
// RGB functions for the RGB layer.
|
|
#ifdef RGB_MATRIX_ENABLE
|
|
ENCODER_FUNCTION(_RGB, LEFT,
|
|
rgb_matrix_increase_speed_noeeprom,
|
|
rgb_matrix_decrease_speed_noeeprom, MOD_NONE)
|
|
|
|
ENCODER_FUNCTION(_RGB, RIGHT,
|
|
rgb_matrix_increase_hue_noeeprom,
|
|
rgb_matrix_decrease_hue_noeeprom, MOD_NONE)
|
|
|
|
ENCODER_FUNCTION(_RGB, LEFT,
|
|
rgb_matrix_increase_sat_noeeprom,
|
|
rgb_matrix_decrease_sat_noeeprom, MOD_LSFT)
|
|
|
|
ENCODER_FUNCTION(_RGB, RIGHT,
|
|
rgb_matrix_increase_val_noeeprom,
|
|
rgb_matrix_decrease_val_noeeprom, MOD_LSFT)
|
|
|
|
ENCODER_FUNCTION(_RGB, LEFT,
|
|
rgb_matrix_step_noeeprom;
|
|
rgb_matrix_step_reverse_noeeprom, MOD_LCTL)
|
|
|
|
#elif defined(RGBLIGHT_ENABLE)
|
|
|
|
ENCODER_FUNCTION(_RGB, LEFT,
|
|
rgblight_increase_speed_noeeprom,
|
|
rgblight_decrease_speed_noeeprom, MOD_NONE)
|
|
|
|
ENCODER_FUNCTION(_RGB, RIGHT,
|
|
rgblight_increase_hue_noeeprom,
|
|
rgblight_decrease_hue_noeeprom, MOD_NONE)
|
|
|
|
ENCODER_FUNCTION(_RGB, LEFT,
|
|
rgblight_increase_sat_noeeprom,
|
|
rgblight_decrease_sat_noeeprom, MOD_LSFT)
|
|
|
|
ENCODER_FUNCTION(_RGB, RIGHT,
|
|
rgblight_increase_val_noeeprom,
|
|
rgblight_decrease_val_noeeprom, MOD_LSFT)
|
|
|
|
|
|
ENCODER_FUNCTION(_RGB, LEFT,
|
|
rgblight_step_noeeprom,
|
|
rgblight_step_reverse_noeeprom, MOD_LCTL)
|
|
#endif // RGB_MATRIX_ENABLE || RGBLIGHT_ENABLE
|