Add keycodes to turn on, turn off and toggle faux clicky

This commit is contained in:
Priyadi Iman Nurcahyo 2017-02-13 14:55:35 +07:00
parent c68e596f32
commit 8c93c5d9ab
3 changed files with 43 additions and 0 deletions

View file

@ -7,6 +7,10 @@
#define TAPPING_TERM 200
#endif
#ifdef FAUXCLICKY_ENABLE
#include "fauxclicky.h"
#endif
static void do_code16 (uint16_t code, void (*f) (uint8_t)) {
switch (code) {
case QK_MODS ... QK_MODS_MAX:
@ -196,6 +200,26 @@ bool process_record_quantum(keyrecord_t *record) {
}
return false;
break;
#ifdef FAUXCLICKY_ENABLE
case FC_TOG:
if (record->event.pressed) {
FAUXCLICKY_TOGGLE;
}
return false;
break;
case FC_ON:
if (record->event.pressed) {
FAUXCLICKY_ON;
}
return false;
break;
case FC_OFF:
if (record->event.pressed) {
FAUXCLICKY_OFF;
}
return false;
break;
#endif
#ifdef RGBLIGHT_ENABLE
case RGB_TOG:
if (record->event.pressed) {