summaryrefslogtreecommitdiff
path: root/keyboards/terrazzo/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/terrazzo/readme.md')
-rw-r--r--keyboards/terrazzo/readme.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/keyboards/terrazzo/readme.md b/keyboards/terrazzo/readme.md
index 08cecd6a64..e0f4f3457f 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
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.
```c
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(get_highest_layer(layer_state)) {
case _NAV:
@@ -105,13 +105,14 @@ void encoder_update_user(uint8_t index, bool clockwise) {
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
break;
}
+ return true;
}
```
If using multiple encoders, the `index` param can be used to distingish which is providing input.
```c
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(index) {
case 0:
@@ -121,5 +122,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN);
break;
}
+ return true;
}
-``` \ No newline at end of file
+```