summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-10-26 00:30:24 -0400
committerPete Johanson <peter@peterjohanson.com>2020-11-05 14:55:40 -0500
commiteff1b8223b5010d526914530c5d1d469eff356df (patch)
tree70a7d7c603d0c384110fec9bc4b5dd7b01896a7f /docs
parent5f83568a93bbbf07bed6e710ba8c44e45b955ec5 (diff)
refactor(keys): Unify usage page.
* Remove need for separate `&cp` behavior, but keep it for now for backward compat. * Refactor sensor inc/dec as well.
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/behavior/hold-tap.md2
-rw-r--r--docs/docs/behavior/key-press.md19
-rw-r--r--docs/docs/dev-guide-new-shield.md9
-rw-r--r--docs/docs/feature/encoders.md4
-rw-r--r--docs/docs/feature/keymaps.md4
-rw-r--r--docs/docs/intro.md2
6 files changed, 10 insertions, 30 deletions
diff --git a/docs/docs/behavior/hold-tap.md b/docs/docs/behavior/hold-tap.md
index 182240d..7ae5fc0 100644
--- a/docs/docs/behavior/hold-tap.md
+++ b/docs/docs/behavior/hold-tap.md
@@ -62,7 +62,7 @@ A code example which configures a mod-tap setting that works with homerow mods:
If this config does not work for you, try the flavor "tap-preferred" and a short tapping_term_ms such as 120ms.
-If you want to use a tap-hold with a keycode from a different code page, you have to define another behavior with another "bindings" parameter.For example, if you want to use SHIFT and volume up, define the bindings like `bindings = <&kp>, <&cp>;`. Only single-argument behaviors are supported at the moment.
+If you want to use a tap-hold with a keycode from a different code page, you have to define another behavior with another "bindings" parameter.For example, if you want to use SHIFT and volume up, define the bindings like `bindings = <&kp>, <&kp>;`. Only single-argument behaviors are supported at the moment.
#### Comparison to QMK
diff --git a/docs/docs/behavior/key-press.md b/docs/docs/behavior/key-press.md
index 56b6a49..315e126 100644
--- a/docs/docs/behavior/key-press.md
+++ b/docs/docs/behavior/key-press.md
@@ -46,22 +46,3 @@ Example:
```
&kp A
```
-
-## Consumer Key Press
-
-The "consumer key press" behavior allows you to send "consumer" usage page keycodes on press/release.
-These are mostly used for media and power related keycodes, such as sending "Pause", "Scan Track Next",
-"Scan Track Previous", etc.
-
-There are a subset of the full consumer usage IDs found in the `keys.h` include, prefixed with `C_`, e.g. `C_PREV`.
-
-### Behavior Binding
-
-- Reference: `&cp`
-- Parameter: The keycode usage ID from the consumer usage page, e.g. `C_PREV` or `C_EJECT`
-
-Example:
-
-```
-&cp C_PREV
-```
diff --git a/docs/docs/dev-guide-new-shield.md b/docs/docs/dev-guide-new-shield.md
index 9ad117c..f3491dd 100644
--- a/docs/docs/dev-guide-new-shield.md
+++ b/docs/docs/dev-guide-new-shield.md
@@ -377,7 +377,7 @@ Here is an example simple keymap for the Kyria, with only one layer:
&kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT
>;
- sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
+ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
};
};
@@ -385,15 +385,14 @@ Here is an example simple keymap for the Kyria, with only one layer:
```
:::note
-The two `#include` lines at the top of the keymap are required in order to bring in the default set of behaviors to make them available to bind, and to import a set of defines for the HID keycodes, so keymaps can use parameters like `N2` or `K` instead of the raw keycode numeric values.
+The two `#include` lines at the top of the keymap are required in order to bring in the default set of behaviors to make them available to bind, and to import a set of defines for the key codes, so keymaps can use parameters like `N2` or `K` instead of the raw keycode numeric values.
:::
### Keymap Behaviors
Further documentation on behaviors and bindings is forthcoming, but a summary of the current behaviors you can bind to key positions is as follows:
-- `kp` is the "key press" behavior, and takes a single binding argument of the HID keycode from the 'keyboard/keypad" HID usage table.
-- `cp` is the "consumer key press" behavior, and takes a single binding argument of the HID keycode from the "consumer page" HID usage table. This is mostly useful for media keys.
+- `kp` is the "key press" behavior, and takes a single binding argument of the key code from the 'keyboard/keypad" HID usage table.
- `mo` is the "momentary layer" behaviour, and takes a single binding argument of the numeric ID of the layer to momentarily enable when that key is held.
- `trans` is the "transparent" behavior, useful to be place in higher layers above `mo` bindings to be sure the key release is handled by the lower layer. No binding arguments are required.
- `mt` is the "mod-tap" behavior, and takes two binding arguments, the modifier to use if held, and the keycode to send if tapped.
@@ -476,7 +475,7 @@ For split keyboards, make sure to add left hand encoders to the left .overlay fi
Add the following line to your keymap file to add default encoder behavior bindings:
```
-sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN>;
+sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
```
Add additional bindings as necessary to match the default number of encoders on your board. See the [Encoders](/docs/feature/encoders) and [Keymap](/docs/feature/keymaps) feature documentation for more details.
diff --git a/docs/docs/feature/encoders.md b/docs/docs/feature/encoders.md
index 79b5c3f..b78f89e 100644
--- a/docs/docs/feature/encoders.md
+++ b/docs/docs/feature/encoders.md
@@ -25,7 +25,7 @@ Rotation is handled separately as a type of sensor. The behavior for this is set
sensor-bindings = <BINDING CW_KEY CCW_KEY>;
```
-- `BINDING` is one of two rotation bindings that are currently defined, `&inc_dec_cp` for consumer key presses or `&inc_dec_kp` for normal key presses (see [Key Press](/docs/behavior/key-press) for the difference between the two).
+- `BINDING`, for now, has only one behavior available; `&inc_dec_kp` for key presses (see [Key Press](/docs/behavior/key-press) for details on available keycodes).
- `CW_KEY` is the keycode activated by a clockwise turn.
- `CCW_KEY` is the keycode activated by a counter-clockwise turn.
@@ -34,7 +34,7 @@ Additional encoders can be configured by adding more `BINDING CW_KEY CCW_KEY` se
As an example, a complete `sensor-bindings` for a Kyria with two encoders could look like:
```
-sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
+sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
```
Here, the left encoder is configured to control volume up and down while the right encoder sends either Page Up or Page Down.
diff --git a/docs/docs/feature/keymaps.md b/docs/docs/feature/keymaps.md
index 9c5a064..203b940 100644
--- a/docs/docs/feature/keymaps.md
+++ b/docs/docs/feature/keymaps.md
@@ -139,7 +139,7 @@ that defines just one layer for this keymap:
&kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT
>;
- sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
+ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
};
```
@@ -176,7 +176,7 @@ Putting this all together, a complete [`kyria.keymap`](https://github.com/zmkfir
&kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT
>;
- sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
+ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
};
};
diff --git a/docs/docs/intro.md b/docs/docs/intro.md
index cb227a2..a56e343 100644
--- a/docs/docs/intro.md
+++ b/docs/docs/intro.md
@@ -22,7 +22,7 @@ ZMK is currently missing some features found in other popular firmware. This tab
| [Keymaps and Layers](behavior/layers) | ✅ | ✅ | ✅ |
| [Hold-Tap](behavior/hold-tap) (which includes [Mod-Tap](behavior/mod-tap) and [Layer-Tap](behavior/layers/#layer-tap)) | ✅ | ✅ | ✅ |
| [Basic Keycodes](behavior/key-press) | ✅ | ✅ | ✅ |
-| [Basic consumer (Media) Keycodes](behavior/key-press#consumer-key-press) | ✅ | ✅ | ✅ |
+| [Basic consumer (Media) Keycodes](behavior/key-press) | ✅ | ✅ | ✅ |
| [Encoders](feature/encoders)[^1] | ✅ | | ✅ |
| [OLED Display Support](feature/displays)[^2] | 🚧 | 🚧 | ✅ |
| [RGB Underglow](feature/underglow) | ✅ | ✅ | ✅ |