From 7f9d61fe21d734fe85c58a677d6d5bdb3adabbc6 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 7 Aug 2024 17:27:01 +1000 Subject: [PATCH] Mirror Bluetooth profiles and provide a `NONE` output (i.e. unpaired). --- .../keycodes/keycodes_0.0.5_connection.hjson | 11 +++++++++-- quantum/keycodes.h | 8 +++++--- tests/test_common/keycode_table.cpp | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/data/constants/keycodes/keycodes_0.0.5_connection.hjson b/data/constants/keycodes/keycodes_0.0.5_connection.hjson index 7fd69824e8e..9a1a750f1ae 100644 --- a/data/constants/keycodes/keycodes_0.0.5_connection.hjson +++ b/data/constants/keycodes/keycodes_0.0.5_connection.hjson @@ -21,20 +21,27 @@ ] }, "0x7782": { + "group": "connection", + "key": "QK_OUTPUT_NONE", + "aliases": [ + "OU_NONE" + ] + }, + "0x7783": { "group": "connection", "key": "QK_OUTPUT_USB", "aliases": [ "OU_USB" ] }, - "0x7783": { + "0x7784": { "group": "connection", "key": "QK_OUTPUT_2P4GHZ", "aliases": [ "OU_2P4G" ] }, - "0x7784": { + "0x7785": { "group": "connection", "key": "QK_OUTPUT_BLUETOOTH", "aliases": [ diff --git a/quantum/keycodes.h b/quantum/keycodes.h index 1a6fd9a3407..38127bb6da1 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -624,9 +624,10 @@ enum qk_keycode_defines { QK_MACRO_31 = 0x771F, QK_OUTPUT_NEXT = 0x7780, QK_OUTPUT_PREV = 0x7781, - QK_OUTPUT_USB = 0x7782, - QK_OUTPUT_2P4GHZ = 0x7783, - QK_OUTPUT_BLUETOOTH = 0x7784, + QK_OUTPUT_NONE = 0x7782, + QK_OUTPUT_USB = 0x7783, + QK_OUTPUT_2P4GHZ = 0x7784, + QK_OUTPUT_BLUETOOTH = 0x7785, QK_BLUETOOTH_PROFILE_NEXT = 0x7790, QK_BLUETOOTH_PROFILE_PREV = 0x7791, QK_BLUETOOTH_UNPAIR = 0x7792, @@ -1311,6 +1312,7 @@ enum qk_keycode_defines { OU_NEXT = QK_OUTPUT_NEXT, OU_AUTO = QK_OUTPUT_NEXT, OU_PREV = QK_OUTPUT_PREV, + OU_NONE = QK_OUTPUT_NONE, OU_USB = QK_OUTPUT_USB, OU_2P4G = QK_OUTPUT_2P4GHZ, OU_BT = QK_OUTPUT_BLUETOOTH, diff --git a/tests/test_common/keycode_table.cpp b/tests/test_common/keycode_table.cpp index 53829f80512..e4d445de828 100644 --- a/tests/test_common/keycode_table.cpp +++ b/tests/test_common/keycode_table.cpp @@ -564,6 +564,7 @@ std::map KEYCODE_ID_TABLE = { {QK_MACRO_31, "QK_MACRO_31"}, {QK_OUTPUT_NEXT, "QK_OUTPUT_NEXT"}, {QK_OUTPUT_PREV, "QK_OUTPUT_PREV"}, + {QK_OUTPUT_NONE, "QK_OUTPUT_NONE"}, {QK_OUTPUT_USB, "QK_OUTPUT_USB"}, {QK_OUTPUT_2P4GHZ, "QK_OUTPUT_2P4GHZ"}, {QK_OUTPUT_BLUETOOTH, "QK_OUTPUT_BLUETOOTH"},