diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/blog/2020-08-12-zmk-sotf-1.md | 4 | ||||
-rw-r--r-- | docs/docs/behavior/key-press.md | 2 | ||||
-rw-r--r-- | docs/docs/behavior/layers.md | 51 | ||||
-rw-r--r-- | docs/docs/behavior/misc.md | 41 | ||||
-rw-r--r-- | docs/docs/behavior/mod-tap.md | 29 | ||||
-rw-r--r-- | docs/sidebars.js | 2 | ||||
-rw-r--r-- | docs/static/setup.sh | 3 |
7 files changed, 128 insertions, 4 deletions
diff --git a/docs/blog/2020-08-12-zmk-sotf-1.md b/docs/blog/2020-08-12-zmk-sotf-1.md index 2b69535..8a3ca7c 100644 --- a/docs/blog/2020-08-12-zmk-sotf-1.md +++ b/docs/blog/2020-08-12-zmk-sotf-1.md @@ -28,10 +28,10 @@ There's been lots of various activity in ZMK land! Despite the flurry of activity, there are still some serious bugs and show stoppers that potential ZMK users should be aware of: - [Bluetooth Related](https://github.com/zmkfirmware/zmk/issues/58) - There are several key bugs and fixes needed, including one complete show stopper: - - Fully working split wireless is not working. In particular, both split halves can properly pair, but once they do so, pairing with the _central_ host will not work. Workaround: You can currently have both halves pair, and use USB on the central side (Left side right now for Kyria, Corne, Lily58) and receive HID events over USB. + - <del>Fully working split wireless is not working. In particular, both split halves can properly pair, but once they do so, pairing with the _central_ host will not work. Workaround: You can currently have both halves pair, and use USB on the central side (Left side right now for Kyria, Corne, Lily58) and receive HID events over USB.</del> - Fixed in <a href="https://github.com/zmkfirmware/zmk/commit/8b61beb2bbc62f754db670ad77266f84edde041d">8b61beb</a>. - BT bond information is not currently stored to the devices, so after powering off or restarting your device, users need to re-pair - USB - There is one important USB related bug which is a showstopper: - - The Zephyr USB stack does not have a built in queue for endpoint data being written. As a result, HID events sent by ZMK are sometimes [dropped, or lost](https://github.com/zmkfirmware/zmk/issues/84). + - <del>The Zephyr USB stack does not have a built in queue for endpoint data being written. As a result, HID events sent by ZMK are sometimes <a href="https://github.com/zmkfirmware/zmk/issues/84">dropped, or lost</a>.</del> - Fixed by <a href="https://github.com/careyk007">careyk007</a> in <a href="https://github.com/zmkfirmware/zmk/pull/93">#93</a>. ## Next Steps diff --git a/docs/docs/behavior/key-press.md b/docs/docs/behavior/key-press.md index 08296bb..1ae7e31 100644 --- a/docs/docs/behavior/key-press.md +++ b/docs/docs/behavior/key-press.md @@ -4,7 +4,7 @@ title: Key Presses ## Summary -The most basic of behaiors, is the ability to send certain keycode presses and releases in response to activating +The most basic of behaviors, is the ability to send certain keycode presses and releases in response to activating a certain key. For reference on keycode values, see the [USB HID Usage Tables](https://www.usb.org/document-library/hid-usage-tables-12). diff --git a/docs/docs/behavior/layers.md b/docs/docs/behavior/layers.md index 2388caf..3e520ca 100644 --- a/docs/docs/behavior/layers.md +++ b/docs/docs/behavior/layers.md @@ -39,3 +39,54 @@ Example: ``` &mo LOWER ``` + +## Toggle Layer + +The "toggle layer" behavior allows you to enable a layer until the layer is manually disabled. + +### Behavior Binding + +- Reference: `&tog` +- Parameter: The layer number to enable/disable, e.g. `1` + +Example: + +``` +&tog LOWER +``` + +"Toggle layer" for a : +``` +#define DEFAULT 0 +#define NAVI 1 + +#define NONE 0 + +/ { + keymap { + compatible = "zmk,keymap"; + + 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 + >; + }; + + 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 + >; + }; + }; +}; +``` + +It is possible to use "toggle layer" to have keys that raise and lower the layers as well.
\ No newline at end of file diff --git a/docs/docs/behavior/misc.md b/docs/docs/behavior/misc.md new file mode 100644 index 0000000..799c91c --- /dev/null +++ b/docs/docs/behavior/misc.md @@ -0,0 +1,41 @@ +--- +title: Miscellaneous +--- + +## Summary + +There are a few miscellaneous behaviors that are helpful when working with layers in keymaps, +in particular, with handling what happens in higher layers, and if events are passed to +the next layer or not + +## Transparent + +The transparent behavior simply ignores key position presses/releases, so they will be +passed down to the next active layer in the stack. + +### Behavior Binding + +- Reference: `&trans` +- Parameters: None + +Example: + +``` +&trans +``` + +## None + +The none behavior simply swallows and stops key position presses/releases, so they will **not** +be passed down to the next active layer in the stack. + +### Behavior Binding + +- Reference: `&none` +- Parameters: None + +Example: + +``` +&none +``` diff --git a/docs/docs/behavior/mod-tap.md b/docs/docs/behavior/mod-tap.md new file mode 100644 index 0000000..cae667e --- /dev/null +++ b/docs/docs/behavior/mod-tap.md @@ -0,0 +1,29 @@ +--- +title: Mod-Tap +--- + +## Summary + +The Mod-Tap behavior allows varying the effect of pressing and releasing a key position depending +on whether it is used with other simultaneous key presses at the same time. + +If pressed and released independently, the Mod-Tap behavior will send the press and release events +for the configure keycode. If pressed and held while another key is pressed and released, then +the configured modifiers will be applied to that _other_ key press, and no press will be generated +on the release of the Mod-Tap key. + +## Mod-Tap + +The Mod-Tap behavior either acts as a held modifier, or as a tapped keycode. + +### Behavior Binding + +- Reference: `&mt` +- Parameter #1: The modifiers to be used when activating as a modifier, e.g. `MOD_LSFT` +- Parameter #2: The keycode to sent when used as a tap, e.g. `A`, `B`. + +Example: + +``` +&mt MOD_LSFT A +``` diff --git a/docs/sidebars.js b/docs/sidebars.js index 1bd0358..be02a65 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -10,6 +10,8 @@ module.exports = { Behaviors: [ "behavior/key-press", "behavior/layers", + "behavior/misc", + "behavior/mod-tap", "behavior/lighting", ], Development: [ diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 27dcb0b..55c96ff 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -11,7 +11,7 @@ title="ZMK Config Setup:" # TODO: Check for user.name and user.email git configs being set prompt="Pick an MCU board:" -options=("nice!nano" "QMK Proton-C") +options=("nice!nano" "QMK Proton-C" "BlueMicro52840 (v1)") echo "$title" echo "" @@ -23,6 +23,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) board="nice_nano"; break;; 2 ) board="proton_c"; break;; + 3 ) board="bluemicro52840_v1"; break;; $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit;; *) echo "Invalid option. Try another one.";continue;; |