aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_encoders.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_encoders.md')
-rw-r--r--docs/feature_encoders.md18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md
index 8ab5ca9c4..f301f7068 100644
--- a/docs/feature_encoders.md
+++ b/docs/feature_encoders.md
@@ -70,15 +70,15 @@ or `keymap.c`:
70bool encoder_update_user(uint8_t index, bool clockwise) { 70bool encoder_update_user(uint8_t index, bool clockwise) {
71 if (index == 0) { /* First encoder */ 71 if (index == 0) { /* First encoder */
72 if (clockwise) { 72 if (clockwise) {
73 tap_code(KC_PGDN); 73 tap_code_delay(KC_VOLU, 10);
74 } else { 74 } else {
75 tap_code(KC_PGUP); 75 tap_code_delay(KC_VOLD, 10);
76 } 76 }
77 } else if (index == 1) { /* Second encoder */ 77 } else if (index == 1) { /* Second encoder */
78 if (clockwise) { 78 if (clockwise) {
79 tap_code(KC_DOWN); 79 rgb_matrix_increase_hue();
80 } else { 80 } else {
81 tap_code(KC_UP); 81 rgb_matrix_decrease_hue();
82 } 82 }
83 } 83 }
84 return false; 84 return false;
@@ -100,9 +100,9 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
100 } 100 }
101 } else if (index == 1) { 101 } else if (index == 1) {
102 if (clockwise) { 102 if (clockwise) {
103 tap_code(KC_VOLU); 103 tap_code_delay(KC_VOLU, 10);
104 } else { 104 } else {
105 tap_code(KC_VOLD); 105 tap_code_delay(KC_VOLD, 10);
106 } 106 }
107 } 107 }
108 } else { /* Layer 0 */ 108 } else { /* Layer 0 */
@@ -114,9 +114,9 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
114 } 114 }
115 } else if (index == 1) { 115 } else if (index == 1) {
116 if (clockwise) { 116 if (clockwise) {
117 tap_code(KC_DOWN); 117 rgb_matrix_increase_speed();
118 } else { 118 } else {
119 tap_code(KC_UP); 119 rgb_matrix_decrease_speed();
120 } 120 }
121 } 121 }
122 } 122 }
@@ -124,6 +124,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
124} 124}
125``` 125```
126 126
127?> Media and mouse countrol keycodes such as `KC_VOLU` and `KC_WH_D` requires `EXTRAKEY_ENABLE = yes` and `MOUSEKEY_ENABLE = yes` respectively in user's `rules.mk` if they are not enabled as default on keyboard level configuration.
128
127## Hardware 129## Hardware
128 130
129The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground. 131The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.