Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions data/constants/keycodes/keycodes_0.0.6_connection.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,47 @@
"keycodes": {
"0x7780": {
"group": "connection",
"key": "QK_OUTPUT_NEXT",
"key": "QK_OUTPUT_AUTO",
"aliases": [
"OU_NEXT",
"OU_AUTO"
]
},
"0x7781": {
"group": "connection",
"key": "QK_OUTPUT_NEXT",
"aliases": [
"OU_NEXT"
]
},
"0x7782": {
"group": "connection",
"key": "QK_OUTPUT_PREV",
"aliases": [
"OU_PREV"
]
},
"0x7782": {
"0x7783": {
"group": "connection",
"key": "QK_OUTPUT_NONE",
"aliases": [
"OU_NONE"
]
},
"0x7783": {
"0x7784": {
"group": "connection",
"key": "QK_OUTPUT_USB",
"aliases": [
"OU_USB"
]
},
"0x7784": {
"0x7785": {
"group": "connection",
"key": "QK_OUTPUT_2P4GHZ",
"aliases": [
"OU_2P4G"
]
},
"0x7785": {
"0x7786": {
"group": "connection",
"key": "QK_OUTPUT_BLUETOOTH",
"aliases": [
Expand Down
4 changes: 3 additions & 1 deletion docs/_aliases.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"/tutorial": "/newbs",
"/unicode": "/feature_unicode",

"/features/bluetooth": "/features/wireless",

"/adc_driver": "/drivers/adc",
"/apa102_driver": "/drivers/apa102",
"/audio_driver": "/drivers/audio",
Expand All @@ -24,7 +26,7 @@
"/feature_auto_shift": "/features/auto_shift",
"/feature_autocorrect": "/features/autocorrect",
"/feature_backlight": "/features/backlight",
"/feature_bluetooth": "/features/bluetooth",
"/feature_bluetooth": "/features/wireless",
"/feature_bootmagic": "/features/bootmagic",
"/feature_caps_word": "/features/caps_word",
"/feature_combo": "/features/combo",
Expand Down
4 changes: 2 additions & 2 deletions docs/_sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
]
},
{ "text": "Audio", "link": "/features/audio" },
{ "text": "Bluetooth", "link": "/features/bluetooth" },
{ "text": "Bootmagic", "link": "/features/bootmagic" },
{ "text": "Converters", "link": "/feature_converters" },
{ "text": "Custom Matrix", "link": "/custom_matrix" },
Expand All @@ -179,7 +178,8 @@
{ "text": "Pointing Device", "link": "/features/pointing_device" },
{ "text": "PS/2 Mouse", "link": "/features/ps2_mouse" },
{ "text": "Split Keyboard", "link": "/features/split_keyboard" },
{ "text": "Stenography", "link": "/features/stenography" }
{ "text": "Stenography", "link": "/features/stenography" },
{ "text": "Wireless", "link": "/features/wireless" }
]
},
{
Expand Down
24 changes: 18 additions & 6 deletions docs/features/bluetooth.md → docs/features/wireless.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bluetooth
# Wireless / Bluetooth

## Bluetooth Known Supported Hardware

Expand Down Expand Up @@ -39,8 +39,20 @@ BLUETOOTH_DRIVER = bluefruit_le # or rn42

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.

| Key | Aliases | Description |
|-----------------------|----------------------|------------------------------------------------|
| `QK_OUTPUT_NEXT` | `OU_NEXT`, `OU_AUTO` | Automatically switch between USB and Bluetooth |
| `QK_OUTPUT_USB` | `OU_USB` | USB only |
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Bluetooth only |
| Key | Aliases | Description |
|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
| `QK_OUTPUT_AUTO` | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless |
| `QK_OUTPUT_NEXT` | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
| `QK_OUTPUT_PREV` | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
| `QK_OUTPUT_NONE` | `OU_NONE` | Disable all output **(not yet implemented)** |
| `QK_OUTPUT_USB` | `OU_USB` | Output to USB only |
| `QK_OUTPUT_2P4GHZ` | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)** |
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Output to Bluetooth only |
| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)** |
| `QK_BLUETOOTH_UNPAIR` | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE1` | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE2` | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE3` | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE4` | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE5` | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)** |
30 changes: 21 additions & 9 deletions docs/keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,27 @@ See also: [Backlighting](features/backlight)
| `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the backlight level |
| `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing |

## Bluetooth {#bluetooth}

See also: [Bluetooth](features/bluetooth)

| Key | Aliases | Description |
|-----------------------|----------------------|------------------------------------------------|
| `QK_OUTPUT_NEXT` | `OU_NEXT`, `OU_AUTO` | Automatically switch between USB and Bluetooth |
| `QK_OUTPUT_USB` | `OU_USB` | USB only |
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Bluetooth only |
## Wireless/Bluetooth {#bluetooth}

See also: [Wireless](features/wireless)

| Key | Aliases | Description |
|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
| `QK_OUTPUT_AUTO` | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless |
| `QK_OUTPUT_NEXT` | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
| `QK_OUTPUT_PREV` | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
| `QK_OUTPUT_NONE` | `OU_NONE` | Disable all output **(not yet implemented)** |
| `QK_OUTPUT_USB` | `OU_USB` | Output to USB only |
| `QK_OUTPUT_2P4GHZ` | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)** |
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Output to Bluetooth only |
| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)** |
| `QK_BLUETOOTH_UNPAIR` | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE1` | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE2` | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE3` | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE4` | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)** |
| `QK_BLUETOOTH_PROFILE5` | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)** |

## Caps Word {#caps-word}

Expand Down
4 changes: 2 additions & 2 deletions docs/reference_info_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ Configures the [Backlight](features/backlight) feature.
* `pins` <Badge type="info">Array: Pin</Badge>
* A list of GPIO pins connected to the backlight LEDs (`software` and `timer` drivers only).

## Bluetooth {#bluetooth}
## Wireless/Bluetooth {#bluetooth}

Configures the [Bluetooth](features/bluetooth) feature.
Configures the [Wireless](features/wireless) feature.

* `bluetooth`
* `driver` <Badge type="info">String</Badge>
Expand Down
19 changes: 10 additions & 9 deletions quantum/keycodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,13 @@ enum qk_keycode_defines {
QK_MACRO_29 = 0x771D,
QK_MACRO_30 = 0x771E,
QK_MACRO_31 = 0x771F,
QK_OUTPUT_NEXT = 0x7780,
QK_OUTPUT_PREV = 0x7781,
QK_OUTPUT_NONE = 0x7782,
QK_OUTPUT_USB = 0x7783,
QK_OUTPUT_2P4GHZ = 0x7784,
QK_OUTPUT_BLUETOOTH = 0x7785,
QK_OUTPUT_AUTO = 0x7780,
QK_OUTPUT_NEXT = 0x7781,
QK_OUTPUT_PREV = 0x7782,
QK_OUTPUT_NONE = 0x7783,
QK_OUTPUT_USB = 0x7784,
QK_OUTPUT_2P4GHZ = 0x7785,
QK_OUTPUT_BLUETOOTH = 0x7786,
QK_BLUETOOTH_PROFILE_NEXT = 0x7790,
QK_BLUETOOTH_PROFILE_PREV = 0x7791,
QK_BLUETOOTH_UNPAIR = 0x7792,
Expand Down Expand Up @@ -1309,8 +1310,8 @@ enum qk_keycode_defines {
MC_29 = QK_MACRO_29,
MC_30 = QK_MACRO_30,
MC_31 = QK_MACRO_31,
OU_AUTO = QK_OUTPUT_AUTO,
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,
Expand Down Expand Up @@ -1494,7 +1495,7 @@ enum qk_keycode_defines {
#define IS_AUDIO_KEYCODE(code) ((code) >= QK_AUDIO_ON && (code) <= QK_AUDIO_VOICE_PREVIOUS)
#define IS_STENO_KEYCODE(code) ((code) >= QK_STENO_BOLT && (code) <= QK_STENO_COMB_MAX)
#define IS_MACRO_KEYCODE(code) ((code) >= QK_MACRO_0 && (code) <= QK_MACRO_31)
#define IS_CONNECTION_KEYCODE(code) ((code) >= QK_OUTPUT_NEXT && (code) <= QK_BLUETOOTH_PROFILE5)
#define IS_CONNECTION_KEYCODE(code) ((code) >= QK_OUTPUT_AUTO && (code) <= QK_BLUETOOTH_PROFILE5)
#define IS_BACKLIGHT_KEYCODE(code) ((code) >= QK_BACKLIGHT_ON && (code) <= QK_BACKLIGHT_TOGGLE_BREATHING)
#define IS_LED_MATRIX_KEYCODE(code) ((code) >= QK_LED_MATRIX_ON && (code) <= QK_LED_MATRIX_SPEED_DOWN)
#define IS_UNDERGLOW_KEYCODE(code) ((code) >= QK_UNDERGLOW_TOGGLE && (code) <= QK_UNDERGLOW_SPEED_DOWN)
Expand All @@ -1520,7 +1521,7 @@ enum qk_keycode_defines {
#define AUDIO_KEYCODE_RANGE QK_AUDIO_ON ... QK_AUDIO_VOICE_PREVIOUS
#define STENO_KEYCODE_RANGE QK_STENO_BOLT ... QK_STENO_COMB_MAX
#define MACRO_KEYCODE_RANGE QK_MACRO_0 ... QK_MACRO_31
#define CONNECTION_KEYCODE_RANGE QK_OUTPUT_NEXT ... QK_BLUETOOTH_PROFILE5
#define CONNECTION_KEYCODE_RANGE QK_OUTPUT_AUTO ... QK_BLUETOOTH_PROFILE5
#define BACKLIGHT_KEYCODE_RANGE QK_BACKLIGHT_ON ... QK_BACKLIGHT_TOGGLE_BREATHING
#define LED_MATRIX_KEYCODE_RANGE QK_LED_MATRIX_ON ... QK_LED_MATRIX_SPEED_DOWN
#define UNDERGLOW_KEYCODE_RANGE QK_UNDERGLOW_TOGGLE ... QK_UNDERGLOW_SPEED_DOWN
Expand Down
1 change: 1 addition & 0 deletions tests/test_common/keycode_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ std::map<uint16_t, std::string> KEYCODE_ID_TABLE = {
{QK_MACRO_29, "QK_MACRO_29"},
{QK_MACRO_30, "QK_MACRO_30"},
{QK_MACRO_31, "QK_MACRO_31"},
{QK_OUTPUT_AUTO, "QK_OUTPUT_AUTO"},
{QK_OUTPUT_NEXT, "QK_OUTPUT_NEXT"},
{QK_OUTPUT_PREV, "QK_OUTPUT_PREV"},
{QK_OUTPUT_NONE, "QK_OUTPUT_NONE"},
Expand Down