forked from mirrors/qmk_userspace
Add Faux Clicking as subset of Audio feature (#2748)
* Add Faux Clicky to main Audio feature * Make clicky settings user configurable * Add additional documentation * Don't play when music mode is enabled (hopefully)
This commit is contained in:
parent
23b45710ac
commit
8b0b17a369
7 changed files with 111 additions and 21 deletions
|
@ -224,19 +224,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
#endif //CONSOLE_ENABLE
|
||||
|
||||
// Run custom faux click code, but only if faux clicky is enabled
|
||||
#ifdef AUDIO_ENABLE
|
||||
if ( (faux_click_enabled && keycode != KC_FXCL) || (!faux_click_enabled && keycode == KC_FXCL) ) {
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(fauxclicky_pressed);
|
||||
} else {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(fauxclicky_released);
|
||||
}
|
||||
}
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
|
||||
switch (keycode) {
|
||||
case KC_QWERTY:
|
||||
|
@ -398,11 +385,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
#endif // TAP_DANCE_ENABLE
|
||||
|
||||
|
||||
case KC_FXCL:
|
||||
if (!record->event.pressed) { // Toggles the custom faux click code
|
||||
faux_click_enabled = !faux_click_enabled;
|
||||
}
|
||||
return false; break;
|
||||
case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue