diff options
Diffstat (limited to 'keyboards/terrazzo/readme.md')
-rw-r--r-- | keyboards/terrazzo/readme.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/keyboards/terrazzo/readme.md b/keyboards/terrazzo/readme.md index 08cecd6a6..e0f4f3457 100644 --- a/keyboards/terrazzo/readme.md +++ b/keyboards/terrazzo/readme.md | |||
@@ -93,7 +93,7 @@ Terrazzo has 4 positions for encoders in the left-hand column. Up to 3 may be us | |||
93 | The default keymaps are setup for one encoder. Encoders can change behavior based on the current layer. Here, on the "NAV" layer, the encoder changes volume instead of scrolling. | 93 | The default keymaps are setup for one encoder. Encoders can change behavior based on the current layer. Here, on the "NAV" layer, the encoder changes volume instead of scrolling. |
94 | 94 | ||
95 | ```c | 95 | ```c |
96 | void encoder_update_user(uint8_t index, bool clockwise) { | 96 | bool encoder_update_user(uint8_t index, bool clockwise) { |
97 | terrazzo_scroll_pixel(clockwise); | 97 | terrazzo_scroll_pixel(clockwise); |
98 | switch(get_highest_layer(layer_state)) { | 98 | switch(get_highest_layer(layer_state)) { |
99 | case _NAV: | 99 | case _NAV: |
@@ -105,13 +105,14 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
105 | clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); | 105 | clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); |
106 | break; | 106 | break; |
107 | } | 107 | } |
108 | return true; | ||
108 | } | 109 | } |
109 | ``` | 110 | ``` |
110 | 111 | ||
111 | If using multiple encoders, the `index` param can be used to distingish which is providing input. | 112 | If using multiple encoders, the `index` param can be used to distingish which is providing input. |
112 | 113 | ||
113 | ```c | 114 | ```c |
114 | void encoder_update_user(uint8_t index, bool clockwise) { | 115 | bool encoder_update_user(uint8_t index, bool clockwise) { |
115 | terrazzo_scroll_pixel(clockwise); | 116 | terrazzo_scroll_pixel(clockwise); |
116 | switch(index) { | 117 | switch(index) { |
117 | case 0: | 118 | case 0: |
@@ -121,5 +122,6 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
121 | clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); | 122 | clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); |
122 | break; | 123 | break; |
123 | } | 124 | } |
125 | return true; | ||
124 | } | 126 | } |
125 | ``` \ No newline at end of file | 127 | ``` |