From c17070eca545f654f91cf3dcba6c6c611e0f8d03 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 15:35:21 +0700 Subject: Add layer switcher keycodes: OUT_AUTO, OUT_USB, OUT_BT, OUT_BLE --- quantum/quantum.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index 63ffe2074..1d1a691e2 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,4 +1,5 @@ #include "quantum.h" +#include "outputselect.h" #ifndef TAPPING_TERM #define TAPPING_TERM 200 @@ -212,6 +213,34 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + case OUT_AUTO: + if (record->event.pressed) { + set_output(OUTPUT_AUTO); + } + return false; + break; + case OUT_USB: + if (record->event.pressed) { + set_output(OUTPUT_USB); + } + return false; + break; + #ifdef BLUETOOTH_ENABLE + case OUT_BT: + if (record->event.pressed) { + set_output(OUTPUT_BLUETOOTH); + } + return false; + break; + #endif + #ifdef ADAFRUIT_BLE_ENABLE + case OUT_BLE: + if (record->event.pressed) { + set_output(OUTPUT_ADAFRUIT_BLE); + } + return false; + break; + #endif case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { // MAGIC actions (BOOTMAGIC without the boot) -- cgit v1.2.3 From 2bef8b5b88547ce28fb056559b058e35109278b3 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 19:37:52 +0700 Subject: Limit outputselect to AVR only for now --- quantum/quantum.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index 1d1a691e2..585692d4a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,5 +1,7 @@ #include "quantum.h" +#if defined(__AVR__) #include "outputselect.h" +#endif #ifndef TAPPING_TERM #define TAPPING_TERM 200 @@ -213,6 +215,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + #if defined(__AVR__) case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); @@ -241,6 +244,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + #endif case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { // MAGIC actions (BOOTMAGIC without the boot) -- cgit v1.2.3 From e7c4f621f14b60bde68c01ae076cac49cac9927e Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 22:30:06 +0700 Subject: Restrict outputselect to LUFA only for now --- quantum/quantum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index 585692d4a..ad957a1b1 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,5 +1,5 @@ #include "quantum.h" -#if defined(__AVR__) +#ifdef PROTOCOL_LUFA #include "outputselect.h" #endif @@ -215,7 +215,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif - #if defined(__AVR__) + #ifdef PROTOCOL_LUFA case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); -- cgit v1.2.3