diff options
author | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2017-02-01 15:35:21 +0700 |
---|---|---|
committer | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2017-02-01 15:35:21 +0700 |
commit | c17070eca545f654f91cf3dcba6c6c611e0f8d03 (patch) | |
tree | 4dc59b9274f2d8799587a6fff486f0bd0b50ea51 /quantum/quantum.c | |
parent | d8a9c63c265869822a77ad5c5cb7c8dfa4ff1f6c (diff) | |
download | qmk_firmware-c17070eca545f654f91cf3dcba6c6c611e0f8d03.tar.gz |
Add layer switcher keycodes: OUT_AUTO, OUT_USB, OUT_BT, OUT_BLE
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 29 |
1 files changed, 29 insertions, 0 deletions
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) |