summaryrefslogtreecommitdiff
path: root/users/ericgebhart/defs/encoders.def
blob: 638d3fbf4ba74a5b239598a36ec42f7256cd94da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// 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