diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-02-13 10:58:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 10:58:50 -0500 |
commit | fd2925efbac0d7963f3d267dd5264f08a0a4e9dc (patch) | |
tree | 906568677ed027a807d5e9c0c1bc1c2ae001f0f6 /quantum/quantum.c | |
parent | 21ad0c5bcdf38d3a9bc365ee23d721bfc8af9c56 (diff) | |
parent | 8c93c5d9ab8a0a69d84f707db71f417b66402693 (diff) |
Merge pull request #1094 from priyadi/faux_clicky
Implement faux-clicky feature
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 45ea8cb73c..2088c10c95 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -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) { |