summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-10-31 00:09:47 -0400
committerGitHub <noreply@github.com>2020-10-31 00:09:47 -0400
commit2d31e1d05f737ebf8df2c5261912fe79b56a63c3 (patch)
tree2f32805fffdb24b5806cdf37af762fee221e27c5 /docs
parent3c958e62079059c375b86e29f66137a74c3b36c8 (diff)
parent821f0540711158985eb38b360b1f1b422408ca31 (diff)
Merge pull request #269 from joelspadin/endpoint-selection
feat: only send HID reports to one endpoint
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/behavior/outputs.md59
-rw-r--r--docs/sidebars.js1
2 files changed, 60 insertions, 0 deletions
diff --git a/docs/docs/behavior/outputs.md b/docs/docs/behavior/outputs.md
new file mode 100644
index 0000000..50afac9
--- /dev/null
+++ b/docs/docs/behavior/outputs.md
@@ -0,0 +1,59 @@
+---
+title: Output Selection Behavior
+sidebar_label: Output Selection
+---
+
+## Summary
+
+The output behavior allows selecting whether keyboard output is sent to the
+USB or bluetooth connection when both are connected. This allows connecting a
+keyboard to USB for power but outputting to a different device over bluetooth.
+
+By default, output is sent to USB when both USB and BLE are connected.
+Once you select a different output, it will be remembered until you change it again.
+
+## Output Command Defines
+
+Output command defines are provided through the [`dt-bindings/zmk/outputs.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/outputs.h)
+header, which is added at the top of the keymap file:
+
+```
+#include <dt-bindings/zmk/outputs.h>
+```
+
+This allows you to reference the actions defined in this header:
+
+| Define | Action | Alias |
+| ------------------- | ----------------------------------------------- | --------- |
+| `OUTPUT_USB_CMD` | Prefer sending to USB | `OUT_USB` |
+| `OUTPUT_BLE_CMD` | Prefer sending to the current bluetooth profile | `OUT_BLE` |
+| `OUTPUT_TOGGLE_CMD` | Toggle between USB and BLE | `OUT_TOG` |
+
+## Output Selection Behavior
+
+The output selection behavior changes the preferred output on press.
+
+### Behavior Binding
+
+- Reference: `&out`
+- Parameter #1: Command, e.g. `OUT_BLE`
+
+### Example:
+
+1. Behavior binding to prefer sending keyboard output to USB
+
+ ```
+ &out OUT_USB
+ ```
+
+1. Behavior binding to prefer sending keyboard output to the current bluetooth profile
+
+ ```
+ &out OUT_BLE
+ ```
+
+1. Behavior binding to toggle between preferring USB and BLE
+
+ ```
+ &out OUT_TOG
+ ```
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 54f6576..c8dc79f 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -22,6 +22,7 @@ module.exports = {
"behavior/mod-tap",
"behavior/reset",
"behavior/bluetooth",
+ "behavior/outputs",
"behavior/lighting",
"behavior/power",
],