diff options
Diffstat (limited to 'users')
-rw-r--r-- | users/greatwizard/greatwizard.c | 3 | ||||
-rw-r--r-- | users/kuchosauronad0/encoder.c | 3 | ||||
-rw-r--r-- | users/kuchosauronad0/encoder.h | 2 | ||||
-rw-r--r-- | users/ninjonas/encoder.c | 7 | ||||
-rw-r--r-- | users/stanrc85/stanrc85.c | 7 | ||||
-rw-r--r-- | users/xulkal/custom_encoder.c | 3 |
6 files changed, 15 insertions, 10 deletions
diff --git a/users/greatwizard/greatwizard.c b/users/greatwizard/greatwizard.c index 46ee41436..3ec856d72 100644 --- a/users/greatwizard/greatwizard.c +++ b/users/greatwizard/greatwizard.c | |||
@@ -70,7 +70,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
70 | } | 70 | } |
71 | 71 | ||
72 | #ifdef ENCODER_ENABLE | 72 | #ifdef ENCODER_ENABLE |
73 | void encoder_update_user(uint8_t index, bool clockwise) { | 73 | bool encoder_update_user(uint8_t index, bool clockwise) { |
74 | switch (get_highest_layer(layer_state)) { | 74 | switch (get_highest_layer(layer_state)) { |
75 | case _QWERTY: | 75 | case _QWERTY: |
76 | #ifdef LAYERS_PROGRAMMER | 76 | #ifdef LAYERS_PROGRAMMER |
@@ -90,6 +90,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
90 | } | 90 | } |
91 | break; | 91 | break; |
92 | } | 92 | } |
93 | return true; | ||
93 | } | 94 | } |
94 | #endif | 95 | #endif |
95 | 96 | ||
diff --git a/users/kuchosauronad0/encoder.c b/users/kuchosauronad0/encoder.c index 06b7b5123..9284a041c 100644 --- a/users/kuchosauronad0/encoder.c +++ b/users/kuchosauronad0/encoder.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "encoder.h" | 1 | #include "encoder.h" |
2 | void encoder_update_user(uint8_t index, bool clockwise) { | 2 | bool encoder_update_user(uint8_t index, bool clockwise) { |
3 | static uint16_t kc; | 3 | static uint16_t kc; |
4 | uint8_t temp_mod = get_mods(); | 4 | uint8_t temp_mod = get_mods(); |
5 | if (index == 0) { /* first encoder */ | 5 | if (index == 0) { /* first encoder */ |
@@ -55,6 +55,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
55 | tap_code(KC_1); | 55 | tap_code(KC_1); |
56 | } | 56 | } |
57 | } | 57 | } |
58 | return true; | ||
58 | } | 59 | } |
59 | const uint16_t PROGMEM encoder_actions[][9] = { \ | 60 | const uint16_t PROGMEM encoder_actions[][9] = { \ |
60 | // None CTRL ALT SHIFT GUI CTRL+ALT CTRL+SHFT ALT+SHFT HYPER | 61 | // None CTRL ALT SHIFT GUI CTRL+ALT CTRL+SHFT ALT+SHFT HYPER |
diff --git a/users/kuchosauronad0/encoder.h b/users/kuchosauronad0/encoder.h index 2610c9677..7b05aa491 100644 --- a/users/kuchosauronad0/encoder.h +++ b/users/kuchosauronad0/encoder.h | |||
@@ -1,4 +1,4 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | #include "quantum.h" | 2 | #include "quantum.h" |
3 | const uint16_t PROGMEM encoder_actions[][9]; | 3 | const uint16_t PROGMEM encoder_actions[][9]; |
4 | void encoder_update_user(uint8_t index, bool clockwise); | 4 | bool encoder_update_user(uint8_t index, bool clockwise); |
diff --git a/users/ninjonas/encoder.c b/users/ninjonas/encoder.c index 3d56ff89e..f1b448b79 100644 --- a/users/ninjonas/encoder.c +++ b/users/ninjonas/encoder.c | |||
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | #include "ninjonas.h" | 16 | #include "ninjonas.h" |
17 | 17 | ||
18 | #ifdef ENCODER_ENABLE | 18 | #ifdef ENCODER_ENABLE |
19 | void left_encoder_cw(void) { | 19 | void left_encoder_cw(void) { |
20 | switch (get_highest_layer(layer_state)) { | 20 | switch (get_highest_layer(layer_state)) { |
21 | case _LOWER: | 21 | case _LOWER: |
@@ -81,7 +81,7 @@ void right_encoder_acw(void) { | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | void encoder_update_user(uint8_t index, bool clockwise) { | 84 | bool encoder_update_user(uint8_t index, bool clockwise) { |
85 | encoder_rotated_timer = timer_read(); | 85 | encoder_rotated_timer = timer_read(); |
86 | if (index == 0) { | 86 | if (index == 0) { |
87 | left_encoder_rotated = true; | 87 | left_encoder_rotated = true; |
@@ -99,6 +99,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
99 | right_encoder_acw(); | 99 | right_encoder_acw(); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | return true; | ||
102 | } | 103 | } |
103 | 104 | ||
104 | #endif \ No newline at end of file | 105 | #endif |
diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index d5e56571d..f8555d87b 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c | |||
@@ -45,7 +45,7 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { | |||
45 | } | 45 | } |
46 | 46 | ||
47 | #if defined(HAS_ROTARY) | 47 | #if defined(HAS_ROTARY) |
48 | void encoder_update_user(uint8_t index, bool clockwise) { | 48 | bool encoder_update_user(uint8_t index, bool clockwise) { |
49 | if (index == 0) { /* First encoder */ | 49 | if (index == 0) { /* First encoder */ |
50 | if (clockwise) { | 50 | if (clockwise) { |
51 | tap_code(KC_VOLD); | 51 | tap_code(KC_VOLD); |
@@ -53,6 +53,7 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { | |||
53 | tap_code(KC_VOLU); | 53 | tap_code(KC_VOLU); |
54 | } | 54 | } |
55 | } | 55 | } |
56 | return true; | ||
56 | } | 57 | } |
57 | #endif | 58 | #endif |
58 | 59 | ||
@@ -75,7 +76,7 @@ void lock_unlock (qk_tap_dance_state_t *state, void *user_data) { | |||
75 | writePin(INDICATOR_PIN_1, !led_user); | 76 | writePin(INDICATOR_PIN_1, !led_user); |
76 | wait_ms(200); | 77 | wait_ms(200); |
77 | writePin(INDICATOR_PIN_2, !led_user); | 78 | writePin(INDICATOR_PIN_2, !led_user); |
78 | #endif | 79 | #endif |
79 | break; | 80 | break; |
80 | case SINGLE_HOLD: | 81 | case SINGLE_HOLD: |
81 | break; | 82 | break; |
@@ -91,7 +92,7 @@ void lock_unlock (qk_tap_dance_state_t *state, void *user_data) { | |||
91 | writePin(INDICATOR_PIN_1, !led_user); | 92 | writePin(INDICATOR_PIN_1, !led_user); |
92 | wait_ms(200); | 93 | wait_ms(200); |
93 | writePin(INDICATOR_PIN_0, !led_user); | 94 | writePin(INDICATOR_PIN_0, !led_user); |
94 | #endif | 95 | #endif |
95 | break; | 96 | break; |
96 | } | 97 | } |
97 | } | 98 | } |
diff --git a/users/xulkal/custom_encoder.c b/users/xulkal/custom_encoder.c index cd029944f..acd0275a8 100644 --- a/users/xulkal/custom_encoder.c +++ b/users/xulkal/custom_encoder.c | |||
@@ -58,7 +58,7 @@ const uint16_t PROGMEM encoders[][2] = { | |||
58 | { KC_VOLU, KC_VOLD } | 58 | { KC_VOLU, KC_VOLD } |
59 | }; | 59 | }; |
60 | 60 | ||
61 | void encoder_update_user(uint8_t index, bool clockwise) | 61 | bool encoder_update_user(uint8_t index, bool clockwise) |
62 | { | 62 | { |
63 | if (!is_keyboard_master()) | 63 | if (!is_keyboard_master()) |
64 | return; | 64 | return; |
@@ -69,4 +69,5 @@ void encoder_update_user(uint8_t index, bool clockwise) | |||
69 | else | 69 | else |
70 | #endif // RGB_OLED_MENU | 70 | #endif // RGB_OLED_MENU |
71 | tap_code16(pgm_read_word(&encoders[index][clockwise])); | 71 | tap_code16(pgm_read_word(&encoders[index][clockwise])); |
72 | return true; | ||
72 | } | 73 | } |