aboutsummaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_connection.c
diff options
context:
space:
mode:
authorNick Brassel <[email protected]>2024-11-27 21:29:12 +1100
committerNick Brassel <[email protected]>2024-11-27 21:29:12 +1100
commit9f76541b29056150cf57d69569a14a59e13995c7 (patch)
tree66c7398d873fcda88aebe3090603aefe045ff52e /quantum/process_keycode/process_connection.c
parent57be4871616ee9a8fe042f6186010d436ec7d4b1 (diff)
parenteb04b94eecbb9b3e64ca9c74f937b5f762440b17 (diff)
downloadqmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.tar.gz
qmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.zip
Merge branch 'develop'
Diffstat (limited to 'quantum/process_keycode/process_connection.c')
-rw-r--r--quantum/process_keycode/process_connection.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_connection.c b/quantum/process_keycode/process_connection.c
new file mode 100644
index 0000000000..b0e230d680
--- /dev/null
+++ b/quantum/process_keycode/process_connection.c
@@ -0,0 +1,36 @@
+// Copyright 2024 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include "outputselect.h"
+#include "process_connection.h"
+
+bool process_connection(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch (keycode) {
+ case QK_OUTPUT_NEXT:
+ set_output(OUTPUT_AUTO); // This should cycle through the outputs going forward. Ensure `docs/keycodes.md`, `docs/features/bluetooth.md` are updated when it does.
+ return false;
+ case QK_OUTPUT_USB:
+ set_output(OUTPUT_USB);
+ return false;
+ case QK_OUTPUT_BLUETOOTH:
+ set_output(OUTPUT_BLUETOOTH);
+ return false;
+
+ case QK_OUTPUT_PREV:
+ case QK_OUTPUT_NONE:
+ case QK_OUTPUT_2P4GHZ:
+ case QK_BLUETOOTH_PROFILE_NEXT:
+ case QK_BLUETOOTH_PROFILE_PREV:
+ case QK_BLUETOOTH_UNPAIR:
+ case QK_BLUETOOTH_PROFILE1:
+ case QK_BLUETOOTH_PROFILE2:
+ case QK_BLUETOOTH_PROFILE3:
+ case QK_BLUETOOTH_PROFILE4:
+ case QK_BLUETOOTH_PROFILE5:
+ // As-yet unimplemented.
+ // When implementation is done, ensure `docs/keycodes.md`, `docs/features/bluetooth.md` are updated accordingly.
+ return false;
+ }
+ }
+ return true;
+}