parent
aebe90908d
commit
b8f6d52ae5
8 changed files with 38 additions and 38 deletions
|
@ -52,7 +52,7 @@ A code example which configures a mod-tap setting that works with homerow mods:
|
|||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&hm LCTL A &hm LGUI S &hm LALT D &hm LSFT F
|
||||
&hm LCTRL A &hm LGUI S &hm LALT D &hm LSHFT F
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -53,15 +53,15 @@ The "consumer key press" behavior allows you to send "consumer" usage page keyco
|
|||
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 `M_`, e.g. `M_PREV`.
|
||||
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. `M_PREV` or `M_EJCT`
|
||||
- Parameter: The keycode usage ID from the consumer usage page, e.g. `C_PREV` or `C_EJECT`
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
&cp M_PREV
|
||||
&cp C_PREV
|
||||
```
|
||||
|
|
|
@ -54,7 +54,7 @@ The "layer-tap" behavior enables a layer when a key is held, and output another
|
|||
Example:
|
||||
|
||||
```
|
||||
< LOWER SPC
|
||||
< LOWER SPACE
|
||||
```
|
||||
|
||||
## Toggle Layer
|
||||
|
@ -86,21 +86,21 @@ Example:
|
|||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&tog NAVI &kp KDIV &kp KMLT &kp KMIN
|
||||
&kp NUM_7 &kp NUM_8 &kp NUM_9 &kp KPLS
|
||||
&kp NUM_4 &kp NUM_5 &kp NUM_6 &kp KPLS
|
||||
&kp NUM_1 &kp NUM_2 &kp NUM_3 &kp RET
|
||||
&kp NUM_0 &kp NUM_0 &kp DOT &kp RET
|
||||
&tog NAVI &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
||||
&kp NUMBER_7 &kp NUMBER_8 &kp NUMBER_9 &kp KP_PLUS
|
||||
&kp NUMBER_4 &kp NUMBER_5 &kp NUMBER_6 &kp KP_PLUS
|
||||
&kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp RETURN
|
||||
&kp NUMBER_0 &kp NUMBER_0 &kp DOT &kp RETURN
|
||||
>;
|
||||
};
|
||||
|
||||
nav_layer {
|
||||
bindings = <
|
||||
&tog NAVI &kp KDIV &kp KMLT &kp KMIN
|
||||
&kp HOME &kp UARW &kp PGUP &kp KPLS
|
||||
&kp LARW &none &kp RARW &kp KPLS
|
||||
&kp END &kp DARW &kp PGDN &kp RET
|
||||
&kp INS &kp INS &kp DEL &kp RET
|
||||
&tog NAVI &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
||||
&kp HOME &kp UP &kp PAGE_UP &kp KP_PLUS
|
||||
&kp LEFT &none &kp RIGHT &kp KP_PLUS
|
||||
&kp END &kp DOWN &kp PAGE_DOWN &kp RETURN
|
||||
&kp INSERT &kp INSERT &kp DEL &kp RETURN
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -16,13 +16,13 @@ The Mod-Tap behavior either acts as a held modifier, or as a tapped keycode.
|
|||
### Behavior Binding
|
||||
|
||||
- Reference: `&mt`
|
||||
- Parameter #1: The keycode to be sent when activating as a modifier, e.g. `LSFT`
|
||||
- Parameter #1: The keycode to be sent when activating as a modifier, e.g. `LSHFT`
|
||||
- Parameter #2: The keycode to sent when used as a tap, e.g. `A`, `B`.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
&mt LSFT A
|
||||
&mt LSHFT A
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
|
|
@ -372,12 +372,12 @@ Here is an example simple keymap for the Kyria, with only one layer:
|
|||
// | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT |
|
||||
bindings = <
|
||||
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
||||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
|
||||
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LSFT &kp LSFT &kp LSFT &kp LSFT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RCTL
|
||||
&kp LGUI &kp DEL &kp RET &kp SPC &kp ESC &kp RET &kp SPC &kp TAB &kp BKSP &kp RALT
|
||||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp QUOTE
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL
|
||||
&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 M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>;
|
||||
sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -385,7 +385,7 @@ 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 `NUM_2` 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 HID keycodes, so keymaps can use parameters like `N2` or `K` instead of the raw keycode numeric values.
|
||||
:::
|
||||
|
||||
### Keymap Behaviors
|
||||
|
@ -476,7 +476,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 M_VOLU M_VOLD>;
|
||||
sensor-bindings = <&inc_dec_cp 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.
|
||||
|
|
|
@ -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 M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>;
|
||||
sensor-bindings = <&inc_dec_cp 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.
|
||||
|
|
|
@ -68,7 +68,7 @@ In this case, the `A` is actually a define for the raw HID keycode, to make keym
|
|||
For example of a binding that uses two parameters, you can see how "mod-tap" (`mt`) is bound:
|
||||
|
||||
```
|
||||
&mt LSFT D
|
||||
&mt LSHFT D
|
||||
```
|
||||
|
||||
Here, the first parameter is the set of modifiers that should be used for the "hold" behavior, and the second
|
||||
|
@ -92,7 +92,7 @@ The top two lines of most keymaps should include:
|
|||
|
||||
The first defines the nodes for all the available behaviors in ZMK, which will be referenced in the behavior bindings. This is how bindings like `&kp` can reference the key press behavior defined with an anchor name of `kp`.
|
||||
|
||||
The second include brings in the defines for all the keycodes (e.g. `A`, `NUM_1`, `M_PLAY`) and the modifiers (e.g. `LSFT`) used for various behavior bindings.
|
||||
The second include brings in the defines for all the keycodes (e.g. `A`, `N1`, `C_PLAY`) and the modifiers (e.g. `LSHFT`) used for various behavior bindings.
|
||||
|
||||
### Root devicetree Node
|
||||
|
||||
|
@ -134,14 +134,14 @@ that defines just one layer for this keymap:
|
|||
// | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT |
|
||||
bindings = <
|
||||
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
||||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
|
||||
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LSFT &kp LSFT &kp LSFT &kp LSFT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RCTL
|
||||
&kp LGUI &kp DEL &kp RET &kp SPC &kp ESC &kp RET &kp SPC &kp TAB &kp BKSP &kp RALT
|
||||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp QUOTE
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL
|
||||
&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 M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>;
|
||||
sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Each layer should have:
|
||||
|
@ -171,12 +171,12 @@ Putting this all together, a complete [`kyria.keymap`](https://github.com/zmkfir
|
|||
// | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT |
|
||||
bindings = <
|
||||
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
||||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
|
||||
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LSFT &kp LSFT &kp LSFT &kp LSFT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RCTL
|
||||
&kp LGUI &kp DEL &kp RET &kp SPC &kp ESC &kp RET &kp SPC &kp TAB &kp BKSP &kp RALT
|
||||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp QUOTE
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL
|
||||
&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 M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>;
|
||||
sensor-bindings = <&inc_dec_cp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -59,9 +59,9 @@ After opening the `<board>.dts.pre.tmp:<line number>` and scrolling down to the
|
|||
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| An incorrectly defined keymap unable to compile. As shown in red, `&kp SPAC` is not a valid reference to the [USB HID Usage ID](https://www.usb.org/document-library/hid-usage-tables-12) used for "Keyboard Spacebar" |
|
||||
|
||||
|  |
|
||||
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| A properly defined keymap with successful compilation. As shown in red, the corrected keycode (`&kp SPC`) references the proper Usage ID defined in the [USB HID Usage Tables](https://www.usb.org/document-library/hid-usage-tables-12) |
|
||||
|  |
|
||||
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| A properly defined keymap with successful compilation. As shown in red, the corrected keycode (`&kp SPACE`) references the proper Usage ID defined in the [USB HID Usage Tables](https://www.usb.org/document-library/hid-usage-tables-12) |
|
||||
|
||||
### Split Keyboard Halves Unable to Pair
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue