diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/quantum.c | 33 | ||||
| -rw-r--r-- | quantum/quantum.h | 1 | ||||
| -rw-r--r-- | quantum/quantum_keycodes.h | 10 |
3 files changed, 43 insertions, 1 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index b83ae433e..d3905decf 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | #include "quantum.h" | 1 | #include "quantum.h" |
| 2 | #ifdef PROTOCOL_LUFA | ||
| 3 | #include "outputselect.h" | ||
| 4 | #endif | ||
| 2 | 5 | ||
| 3 | #ifndef TAPPING_TERM | 6 | #ifndef TAPPING_TERM |
| 4 | #define TAPPING_TERM 200 | 7 | #define TAPPING_TERM 200 |
| @@ -243,6 +246,36 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 243 | return false; | 246 | return false; |
| 244 | break; | 247 | break; |
| 245 | #endif | 248 | #endif |
| 249 | #ifdef PROTOCOL_LUFA | ||
| 250 | case OUT_AUTO: | ||
| 251 | if (record->event.pressed) { | ||
| 252 | set_output(OUTPUT_AUTO); | ||
| 253 | } | ||
| 254 | return false; | ||
| 255 | break; | ||
| 256 | case OUT_USB: | ||
| 257 | if (record->event.pressed) { | ||
| 258 | set_output(OUTPUT_USB); | ||
| 259 | } | ||
| 260 | return false; | ||
| 261 | break; | ||
| 262 | #ifdef BLUETOOTH_ENABLE | ||
| 263 | case OUT_BT: | ||
| 264 | if (record->event.pressed) { | ||
| 265 | set_output(OUTPUT_BLUETOOTH); | ||
| 266 | } | ||
| 267 | return false; | ||
| 268 | break; | ||
| 269 | #endif | ||
| 270 | #ifdef ADAFRUIT_BLE_ENABLE | ||
| 271 | case OUT_BLE: | ||
| 272 | if (record->event.pressed) { | ||
| 273 | set_output(OUTPUT_ADAFRUIT_BLE); | ||
| 274 | } | ||
| 275 | return false; | ||
| 276 | break; | ||
| 277 | #endif | ||
| 278 | #endif | ||
| 246 | case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: | 279 | case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: |
| 247 | if (record->event.pressed) { | 280 | if (record->event.pressed) { |
| 248 | // MAGIC actions (BOOTMAGIC without the boot) | 281 | // MAGIC actions (BOOTMAGIC without the boot) |
diff --git a/quantum/quantum.h b/quantum/quantum.h index 8614c053a..18f072189 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #ifdef RGBLIGHT_ENABLE | 15 | #ifdef RGBLIGHT_ENABLE |
| 16 | #include "rgblight.h" | 16 | #include "rgblight.h" |
| 17 | #endif | 17 | #endif |
| 18 | |||
| 19 | #include "action_layer.h" | 18 | #include "action_layer.h" |
| 20 | #include "eeconfig.h" | 19 | #include "eeconfig.h" |
| 21 | #include <stddef.h> | 20 | #include <stddef.h> |
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 91324be35..a786bd322 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -141,6 +141,16 @@ enum quantum_keycodes { | |||
| 141 | PRINT_ON, | 141 | PRINT_ON, |
| 142 | PRINT_OFF, | 142 | PRINT_OFF, |
| 143 | 143 | ||
| 144 | // output selection | ||
| 145 | OUT_AUTO, | ||
| 146 | OUT_USB, | ||
| 147 | #ifdef BLUETOOTH_ENABLE | ||
| 148 | OUT_BT, | ||
| 149 | #endif | ||
| 150 | #ifdef ADAFRUIT_BLE_ENABLE | ||
| 151 | OUT_BLE, | ||
| 152 | #endif | ||
| 153 | |||
| 144 | // always leave at the end | 154 | // always leave at the end |
| 145 | SAFE_RANGE | 155 | SAFE_RANGE |
| 146 | }; | 156 | }; |
