diff options
Diffstat (limited to 'quantum/process_keycode/process_clicky.c')
| -rw-r--r-- | quantum/process_keycode/process_clicky.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c index b3c8d890e..36578047a 100644 --- a/quantum/process_keycode/process_clicky.c +++ b/quantum/process_keycode/process_clicky.c | |||
| @@ -56,17 +56,17 @@ void clicky_freq_reset(void) { | |||
| 56 | clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT; | 56 | clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | void clicky_freq_toggle(void) { | 59 | void clicky_toggle(void) { |
| 60 | audio_config.clicky_enable ^= 1; | 60 | audio_config.clicky_enable ^= 1; |
| 61 | eeconfig_update_audio(audio_config.raw); | 61 | eeconfig_update_audio(audio_config.raw); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | void clicky_freq_on(void) { | 64 | void clicky_on(void) { |
| 65 | audio_config.clicky_enable = 1; | 65 | audio_config.clicky_enable = 1; |
| 66 | eeconfig_update_audio(audio_config.raw); | 66 | eeconfig_update_audio(audio_config.raw); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void clicky_freq_off(void) { | 69 | void clicky_off(void) { |
| 70 | audio_config.clicky_enable = 0; | 70 | audio_config.clicky_enable = 0; |
| 71 | eeconfig_update_audio(audio_config.raw); | 71 | eeconfig_update_audio(audio_config.raw); |
| 72 | } | 72 | } |
| @@ -76,7 +76,10 @@ bool is_clicky_on(void) { | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | bool process_clicky(uint16_t keycode, keyrecord_t *record) { | 78 | bool process_clicky(uint16_t keycode, keyrecord_t *record) { |
| 79 | if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_freq_toggle(); } | 79 | if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_toggle(); } |
| 80 | |||
| 81 | if (keycode == CLICKY_ENABLE && record->event.pressed) { clicky_on(); } | ||
| 82 | if (keycode == CLICKY_DISABLE && record->event.pressed) { clicky_off(); } | ||
| 80 | 83 | ||
| 81 | if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq_reset(); } | 84 | if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq_reset(); } |
| 82 | 85 | ||
