process_connection.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2024 Nick Brassel (@tzarc)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "outputselect.h"
  4. #include "process_connection.h"
  5. bool process_connection(uint16_t keycode, keyrecord_t *record) {
  6. if (record->event.pressed) {
  7. switch (keycode) {
  8. case QK_OUTPUT_NEXT:
  9. 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.
  10. return false;
  11. case QK_OUTPUT_USB:
  12. set_output(OUTPUT_USB);
  13. return false;
  14. case QK_OUTPUT_BLUETOOTH:
  15. set_output(OUTPUT_BLUETOOTH);
  16. return false;
  17. case QK_OUTPUT_PREV:
  18. case QK_OUTPUT_NONE:
  19. case QK_OUTPUT_2P4GHZ:
  20. case QK_BLUETOOTH_PROFILE_NEXT:
  21. case QK_BLUETOOTH_PROFILE_PREV:
  22. case QK_BLUETOOTH_UNPAIR:
  23. case QK_BLUETOOTH_PROFILE1:
  24. case QK_BLUETOOTH_PROFILE2:
  25. case QK_BLUETOOTH_PROFILE3:
  26. case QK_BLUETOOTH_PROFILE4:
  27. case QK_BLUETOOTH_PROFILE5:
  28. // As-yet unimplemented.
  29. // When implementation is done, ensure `docs/keycodes.md`, `docs/features/bluetooth.md` are updated accordingly.
  30. return false;
  31. }
  32. }
  33. return true;
  34. }