0bda0f47754d01aa904f9831ff58ef760807ab16

Author
Nick Brassel <nick@tzarc.org>
Committer
GitHub <noreply@github.com>
Date

Message

Revert removal of `QK_OUTPUT_AUTO`, fixup docs to reflect. (#24593)

Diff

  1diff --git a/data/constants/keycodes/keycodes_0.0.6_connection.hjson b/data/constants/keycodes/keycodes_0.0.6_connection.hjson
  2index 9a1a750f1aee67d4c14bf375843a8caf23d63097..9be110682546fc60c69da8780891a591bea3c5f5 100644
  3--- a/data/constants/keycodes/keycodes_0.0.6_connection.hjson
  4+++ b/data/constants/keycodes/keycodes_0.0.6_connection.hjson
  5@@ -7,41 +7,47 @@
  6     "keycodes": {
  7         "0x7780": {
  8             "group": "connection",
  9-            "key": "QK_OUTPUT_NEXT",
 10+            "key": "QK_OUTPUT_AUTO",
 11             "aliases": [
 12-                "OU_NEXT",
 13                 "OU_AUTO"
 14             ]
 15         },
 16         "0x7781": {
 17+            "group": "connection",
 18+            "key": "QK_OUTPUT_NEXT",
 19+            "aliases": [
 20+                "OU_NEXT"
 21+            ]
 22+        },
 23+        "0x7782": {
 24             "group": "connection",
 25             "key": "QK_OUTPUT_PREV",
 26             "aliases": [
 27                 "OU_PREV"
 28             ]
 29         },
 30-        "0x7782": {
 31+        "0x7783": {
 32             "group": "connection",
 33             "key": "QK_OUTPUT_NONE",
 34             "aliases": [
 35                 "OU_NONE"
 36             ]
 37         },
 38-        "0x7783": {
 39+        "0x7784": {
 40             "group": "connection",
 41             "key": "QK_OUTPUT_USB",
 42             "aliases": [
 43                 "OU_USB"
 44             ]
 45         },
 46-        "0x7784": {
 47+        "0x7785": {
 48             "group": "connection",
 49             "key": "QK_OUTPUT_2P4GHZ",
 50             "aliases": [
 51                 "OU_2P4G"
 52             ]
 53         },
 54-        "0x7785": {
 55+        "0x7786": {
 56             "group": "connection",
 57             "key": "QK_OUTPUT_BLUETOOTH",
 58             "aliases": [
 59diff --git a/docs/_aliases.json b/docs/_aliases.json
 60index f06e032215c402cd19f828872f8dd3a7ed6ab98f..0dfcdea1e2f30d10c366447d4343e7726b8668ba 100644
 61--- a/docs/_aliases.json
 62+++ b/docs/_aliases.json
 63@@ -16,6 +16,8 @@
 64     "/tutorial": "/newbs",
 65     "/unicode": "/feature_unicode",
 66 
 67+    "/features/bluetooth": "/features/wireless",
 68+
 69     "/adc_driver": "/drivers/adc",
 70     "/apa102_driver": "/drivers/apa102",
 71     "/audio_driver": "/drivers/audio",
 72@@ -24,7 +26,7 @@
 73     "/feature_auto_shift": "/features/auto_shift",
 74     "/feature_autocorrect": "/features/autocorrect",
 75     "/feature_backlight": "/features/backlight",
 76-    "/feature_bluetooth": "/features/bluetooth",
 77+    "/feature_bluetooth": "/features/wireless",
 78     "/feature_bootmagic": "/features/bootmagic",
 79     "/feature_caps_word": "/features/caps_word",
 80     "/feature_combo": "/features/combo",
 81diff --git a/docs/_sidebar.json b/docs/_sidebar.json
 82index d691011d641fec93092fda91ef8c1e555c5e1e05..7f353ad351d0e4287c5bd1f5ad9b9da886f5f6be 100644
 83--- a/docs/_sidebar.json
 84+++ b/docs/_sidebar.json
 85@@ -166,7 +166,6 @@
 86                         ]
 87                     },
 88                     { "text": "Audio", "link": "/features/audio" },
 89-                    { "text": "Bluetooth", "link": "/features/bluetooth" },
 90                     { "text": "Bootmagic", "link": "/features/bootmagic" },
 91                     { "text": "Converters", "link": "/feature_converters" },
 92                     { "text": "Custom Matrix", "link": "/custom_matrix" },
 93@@ -179,7 +178,8 @@
 94                     { "text": "Pointing Device", "link": "/features/pointing_device" },
 95                     { "text": "PS/2 Mouse", "link": "/features/ps2_mouse" },
 96                     { "text": "Split Keyboard", "link": "/features/split_keyboard" },
 97-                    { "text": "Stenography", "link": "/features/stenography" }
 98+                    { "text": "Stenography", "link": "/features/stenography" },
 99+                    { "text": "Wireless", "link": "/features/wireless" }
100                 ]
101             },
102             {
103diff --git a/docs/features/bluetooth.md b/docs/features/wireless.md
104rename from docs/features/bluetooth.md
105rename to docs/features/wireless.md
106index d3634498be4e34980ba430d5e41bddaa20b63279..0d73ad3583e1bb31c261818764fd90aef331b21d 100644
107--- a/docs/features/bluetooth.md
108+++ b/docs/features/wireless.md
109@@ -1,4 +1,4 @@
110-# Bluetooth
111+# Wireless / Bluetooth
112 
113 ## Bluetooth Known Supported Hardware
114 
115@@ -39,8 +39,20 @@ BLUETOOTH_DRIVER = bluefruit_le # or rn42
116 
117 This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
118 
119-| Key                   | Aliases              | Description                                    |
120-|-----------------------|----------------------|------------------------------------------------|
121-| `QK_OUTPUT_NEXT`      | `OU_NEXT`, `OU_AUTO` | Automatically switch between USB and Bluetooth |
122-| `QK_OUTPUT_USB`       | `OU_USB`             | USB only                                       |
123-| `QK_OUTPUT_BLUETOOTH` | `OU_BT`              | Bluetooth only                                 |
124+| Key                         | Aliases   | Description                                                                                   |
125+|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
126+| `QK_OUTPUT_AUTO`            | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless                           |
127+| `QK_OUTPUT_NEXT`            | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)**  |
128+| `QK_OUTPUT_PREV`            | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
129+| `QK_OUTPUT_NONE`            | `OU_NONE` | Disable all output **(not yet implemented)**                                                  |
130+| `QK_OUTPUT_USB`             | `OU_USB`  | Output to USB only                                                                            |
131+| `QK_OUTPUT_2P4GHZ`          | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)**                                               |
132+| `QK_OUTPUT_BLUETOOTH`       | `OU_BT`   | Output to Bluetooth only                                                                      |
133+| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)**                                  |
134+| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)**                              |
135+| `QK_BLUETOOTH_UNPAIR`       | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)**                               |
136+| `QK_BLUETOOTH_PROFILE1`     | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)**                                        |
137+| `QK_BLUETOOTH_PROFILE2`     | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)**                                        |
138+| `QK_BLUETOOTH_PROFILE3`     | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)**                                        |
139+| `QK_BLUETOOTH_PROFILE4`     | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)**                                        |
140+| `QK_BLUETOOTH_PROFILE5`     | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)**                                        |
141diff --git a/docs/keycodes.md b/docs/keycodes.md
142index 1210390f54bf8a9c785ece2269e3de92414aff6d..3665747a0bf8bf53e3e4146c5f11519fd4b295d4 100644
143--- a/docs/keycodes.md
144+++ b/docs/keycodes.md
145@@ -290,15 +290,27 @@ See also: [Backlighting](features/backlight)
146 | `QK_BACKLIGHT_DOWN`             | `BL_DOWN` | Decrease the backlight level        |
147 | `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing          |
148 
149-## Bluetooth {#bluetooth}
150-
151-See also: [Bluetooth](features/bluetooth)
152-
153-| Key                   | Aliases              | Description                                    |
154-|-----------------------|----------------------|------------------------------------------------|
155-| `QK_OUTPUT_NEXT`      | `OU_NEXT`, `OU_AUTO` | Automatically switch between USB and Bluetooth |
156-| `QK_OUTPUT_USB`       | `OU_USB`             | USB only                                       |
157-| `QK_OUTPUT_BLUETOOTH` | `OU_BT`              | Bluetooth only                                 |
158+## Wireless/Bluetooth {#bluetooth}
159+
160+See also: [Wireless](features/wireless)
161+
162+| Key                         | Aliases   | Description                                                                                   |
163+|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
164+| `QK_OUTPUT_AUTO`            | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless                           |
165+| `QK_OUTPUT_NEXT`            | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)**  |
166+| `QK_OUTPUT_PREV`            | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
167+| `QK_OUTPUT_NONE`            | `OU_NONE` | Disable all output **(not yet implemented)**                                                  |
168+| `QK_OUTPUT_USB`             | `OU_USB`  | Output to USB only                                                                            |
169+| `QK_OUTPUT_2P4GHZ`          | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)**                                               |
170+| `QK_OUTPUT_BLUETOOTH`       | `OU_BT`   | Output to Bluetooth only                                                                      |
171+| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)**                                  |
172+| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)**                              |
173+| `QK_BLUETOOTH_UNPAIR`       | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)**                               |
174+| `QK_BLUETOOTH_PROFILE1`     | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)**                                        |
175+| `QK_BLUETOOTH_PROFILE2`     | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)**                                        |
176+| `QK_BLUETOOTH_PROFILE3`     | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)**                                        |
177+| `QK_BLUETOOTH_PROFILE4`     | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)**                                        |
178+| `QK_BLUETOOTH_PROFILE5`     | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)**                                        |
179 
180 ## Caps Word {#caps-word}
181 
182diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
183index c1061cdf8236c655979433148338d180cf16faff..99ff7b1f7a3312f9c62a302b6174e735829b5844 100644
184--- a/docs/reference_info_json.md
185+++ b/docs/reference_info_json.md
186@@ -177,9 +177,9 @@ Configures the [Backlight](features/backlight) feature.
187     * `pins` <Badge type="info">Array: Pin</Badge>
188         * A list of GPIO pins connected to the backlight LEDs (`software` and `timer` drivers only).
189 
190-## Bluetooth {#bluetooth}
191+## Wireless/Bluetooth {#bluetooth}
192 
193-Configures the [Bluetooth](features/bluetooth) feature.
194+Configures the [Wireless](features/wireless) feature.
195 
196 * `bluetooth`
197     * `driver` <Badge type="info">String</Badge>
198diff --git a/quantum/keycodes.h b/quantum/keycodes.h
199index 38127bb6da1fd86b393daf086a024db24ff9d7a5..51b7eb6c9a4219c4429c900ed65e4b45180d987c 100644
200--- a/quantum/keycodes.h
201+++ b/quantum/keycodes.h
202@@ -622,12 +622,13 @@ enum qk_keycode_defines {
203     QK_MACRO_29 = 0x771D,
204     QK_MACRO_30 = 0x771E,
205     QK_MACRO_31 = 0x771F,
206-    QK_OUTPUT_NEXT = 0x7780,
207-    QK_OUTPUT_PREV = 0x7781,
208-    QK_OUTPUT_NONE = 0x7782,
209-    QK_OUTPUT_USB = 0x7783,
210-    QK_OUTPUT_2P4GHZ = 0x7784,
211-    QK_OUTPUT_BLUETOOTH = 0x7785,
212+    QK_OUTPUT_AUTO = 0x7780,
213+    QK_OUTPUT_NEXT = 0x7781,
214+    QK_OUTPUT_PREV = 0x7782,
215+    QK_OUTPUT_NONE = 0x7783,
216+    QK_OUTPUT_USB = 0x7784,
217+    QK_OUTPUT_2P4GHZ = 0x7785,
218+    QK_OUTPUT_BLUETOOTH = 0x7786,
219     QK_BLUETOOTH_PROFILE_NEXT = 0x7790,
220     QK_BLUETOOTH_PROFILE_PREV = 0x7791,
221     QK_BLUETOOTH_UNPAIR = 0x7792,
222@@ -1309,8 +1310,8 @@ enum qk_keycode_defines {
223     MC_29      = QK_MACRO_29,
224     MC_30      = QK_MACRO_30,
225     MC_31      = QK_MACRO_31,
226+    OU_AUTO    = QK_OUTPUT_AUTO,
227     OU_NEXT    = QK_OUTPUT_NEXT,
228-    OU_AUTO    = QK_OUTPUT_NEXT,
229     OU_PREV    = QK_OUTPUT_PREV,
230     OU_NONE    = QK_OUTPUT_NONE,
231     OU_USB     = QK_OUTPUT_USB,
232@@ -1494,7 +1495,7 @@ enum qk_keycode_defines {
233 #define IS_AUDIO_KEYCODE(code) ((code) >= QK_AUDIO_ON && (code) <= QK_AUDIO_VOICE_PREVIOUS)
234 #define IS_STENO_KEYCODE(code) ((code) >= QK_STENO_BOLT && (code) <= QK_STENO_COMB_MAX)
235 #define IS_MACRO_KEYCODE(code) ((code) >= QK_MACRO_0 && (code) <= QK_MACRO_31)
236-#define IS_CONNECTION_KEYCODE(code) ((code) >= QK_OUTPUT_NEXT && (code) <= QK_BLUETOOTH_PROFILE5)
237+#define IS_CONNECTION_KEYCODE(code) ((code) >= QK_OUTPUT_AUTO && (code) <= QK_BLUETOOTH_PROFILE5)
238 #define IS_BACKLIGHT_KEYCODE(code) ((code) >= QK_BACKLIGHT_ON && (code) <= QK_BACKLIGHT_TOGGLE_BREATHING)
239 #define IS_LED_MATRIX_KEYCODE(code) ((code) >= QK_LED_MATRIX_ON && (code) <= QK_LED_MATRIX_SPEED_DOWN)
240 #define IS_UNDERGLOW_KEYCODE(code) ((code) >= QK_UNDERGLOW_TOGGLE && (code) <= QK_UNDERGLOW_SPEED_DOWN)
241@@ -1520,7 +1521,7 @@ enum qk_keycode_defines {
242 #define AUDIO_KEYCODE_RANGE                 QK_AUDIO_ON ... QK_AUDIO_VOICE_PREVIOUS
243 #define STENO_KEYCODE_RANGE                 QK_STENO_BOLT ... QK_STENO_COMB_MAX
244 #define MACRO_KEYCODE_RANGE                 QK_MACRO_0 ... QK_MACRO_31
245-#define CONNECTION_KEYCODE_RANGE            QK_OUTPUT_NEXT ... QK_BLUETOOTH_PROFILE5
246+#define CONNECTION_KEYCODE_RANGE            QK_OUTPUT_AUTO ... QK_BLUETOOTH_PROFILE5
247 #define BACKLIGHT_KEYCODE_RANGE             QK_BACKLIGHT_ON ... QK_BACKLIGHT_TOGGLE_BREATHING
248 #define LED_MATRIX_KEYCODE_RANGE            QK_LED_MATRIX_ON ... QK_LED_MATRIX_SPEED_DOWN
249 #define UNDERGLOW_KEYCODE_RANGE             QK_UNDERGLOW_TOGGLE ... QK_UNDERGLOW_SPEED_DOWN
250diff --git a/tests/test_common/keycode_table.cpp b/tests/test_common/keycode_table.cpp
251index e4d445de82805374c212c6bc53b4fdfe822e2f80..a520dd3f2bf06fc7543fdce81bf8aeb54cedbc39 100644
252--- a/tests/test_common/keycode_table.cpp
253+++ b/tests/test_common/keycode_table.cpp
254@@ -562,6 +562,7 @@ std::map<uint16_t, std::string> KEYCODE_ID_TABLE = {
255     {QK_MACRO_29, "QK_MACRO_29"},
256     {QK_MACRO_30, "QK_MACRO_30"},
257     {QK_MACRO_31, "QK_MACRO_31"},
258+    {QK_OUTPUT_AUTO, "QK_OUTPUT_AUTO"},
259     {QK_OUTPUT_NEXT, "QK_OUTPUT_NEXT"},
260     {QK_OUTPUT_PREV, "QK_OUTPUT_PREV"},
261     {QK_OUTPUT_NONE, "QK_OUTPUT_NONE"},