From 8c93c5d9ab8a0a69d84f707db71f417b66402693 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 14:55:35 +0700 Subject: Add keycodes to turn on, turn off and toggle faux clicky --- quantum/fauxclicky.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'quantum/fauxclicky.h') diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h index 6cfc291c0..109bd0d83 100644 --- a/quantum/fauxclicky.h +++ b/quantum/fauxclicky.h @@ -18,6 +18,7 @@ along with this program. If not, see . #endif #include "musical_notes.h" +#include "stdbool.h" __attribute__ ((weak)) float fauxclicky_pressed_note[2]; @@ -26,6 +27,8 @@ float fauxclicky_released_note[2]; __attribute__ ((weak)) float fauxclicky_beep_note[2]; +bool fauxclicky_enabled; + // // tempo in BPM // @@ -52,6 +55,15 @@ float fauxclicky_beep_note[2]; fauxclicky_stop(); \ } while (0) +// toggle +#define FAUXCLICKY_TOGGLE do { \ + if (fauxclicky_enabled) { \ + FAUXCLICKY_OFF; \ + } else { \ + FAUXCLICKY_ON; \ + } \ +} while (0) + // // pin configuration // -- cgit v1.2.3-24-g4f1b