zmk/docs/blog/2022-04-10-zmk-sotf-5.md
Nicolas Munnich 308d6bce6e
feat(docs): Improve the toolchain setup page (#2272)
Split the toolchain setup into separate docker and native pages
and improve instructions to better refer to Zephyr docs in certain steps.
Also refactor to improve consistency and add virtualenv instructions.

---------

Co-authored-by: KemoNine <mcrosson@kemonine.info>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-06-01 21:51:08 -07:00

269 lines
14 KiB
Markdown

---
title: "ZMK State Of The Firmware #5"
author: Pete Johanson
author_title: Project Creator
author_url: https://gitlab.com/petejohanson
author_image_url: https://www.gravatar.com/avatar/2001ceff7e9dc753cf96fcb2e6f41110
tags: [SOTF, keyboards, firmware, oss, ble]
---
Welcome to the fifth ZMK "State Of The Firmware" (SOTF)!
This update will cover all the major activity since [SOTF #4](/blog/2021/01/27/zmk-sotf-4). That was over a year ago, so lots to cover!
## Recent Activity
Here's a summary of the various major changes since last time, broken down by theme:
### Keymaps/Behaviors
Since last time, there have been several new powerful keymap features and behaviors added, including several asked for features, such as tap-dance and macros.
#### Caps Word
[petejohanson] added the [caps word](/docs/behaviors/caps-word) behavior, i.e. `&caps_word`, in [#823](https://github.com/zmkfirmware/zmk/pull/823) that allows toggling a mode where all all alpha characters are sent
to the host capitalized until a non-alpha, non-"continue list" keycode is sent. This can be useful for typing things like `CONFIG_ENABLE_CAPS_WORD` without having to hold down shift. This is similar in spirit to using the caps lock key, but with the added benefit of turning itself off automatically.
#### Key Repeat
[petejohanson] added the new [key repeat](/docs/behaviors/key-repeat) behavior in [#1034](https://github.com/zmkfirmware/zmk/pull/1034) to allow repeating the last sent key-press again, including any modifiers that were applied to that key press. It can be added to your keymap using the simple `&key_repeat` reference.
#### Macros
[petejohanson], taking heavy inspiration on the initial work from [okke-formsma], added [macro support](/docs/behaviors/macros) in [#1168](https://github.com/zmkfirmware/zmk/pull/1166). Several [common patterns](/docs/behaviors/macros#common-patterns) are documented, but one example, changing the underglow color as you activate/deactivate a layer, looks like:
```dts
ZMK_MACRO(layer_color_macro,
wait-ms = <0>;
tap-ms = <0>;
bindings
= <&macro_press &mo 1>
, <&macro_tap &rgb_ug RGB_COLOR_HSB(128,100,100)>
, <&macro_pause_for_release>
, <&macro_release &mo 1>
, <&macro_tap &rgb_ug RGB_COLOR_HSB(300,100,50)>;
)
```
#### Tap Dance
[kurtis-lew] worked diligently to add the [tap-dance behavior](/docs/behaviors/tap-dance) in [#1139](https://github.com/zmkfirmware/zmk/pull/1139), allowing different behaviors to be invoked based on the number of times
a user taps a single key in their keymap, e.g.
```dts
/ {
behaviors {
td0: tap_dance_0 {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp N1>, <&kp N2>, <&kp N3>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&td0
>;
};
};
};
```
#### Conditional Layers
[bcat] added [conditional layers](/docs/features/conditional-layers) in [#830](https://github.com/zmkfirmware/zmk/pull/830) as a generalized version of the common "adjust layer" pattern on smaller keyboards.
Example:
```dts
/ {
conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <1 2>;
then-layer = <3>;
};
};
};
```
#### Combos
[mcrosson] added the [layer specific combos](https://zmk.dev/docs/features/combos#configuration) in [#661](https://github.com/zmkfirmware/zmk/pull/661), so users can make certain combos only triggerable when the layers set for the combo are active.
This is used by the [ZMK implementation](https://github.com/artseyio/zmk-artsey) of [ARTSEY](https://artsey.io/) extensively.
#### Sticky Keys
[okke-formsma] updated [sticky keys](/docs/behaviors/sticky-key) in [#1122](https://github.com/zmkfirmware/zmk/pull/1122) to add the `ignore-modifiers;` property; when set, sticky keys won't release when other modifiers are pressed. This allows you to combine sticky modifiers, which is popularly used with ["callum-style mods"](https://github.com/callum-oakley/qmk_firmware/tree/master/users/callum#oneshot-modifiers).
#### Hold-Tap Improvements
[jmding8](https://github.com/jmding8) added an additional [positional hold-tap configuration](https://zmk.dev/docs/behaviors/hold-tap#positional-hold-tap-and-hold-trigger-key-positions) in [#835](https://github.com/zmkfirmware/zmk/pull/835) to help certain sequences produce the expected results.
[jmding8](https://github.com/jmding8) also added an additional [hold-tap flavor: `tap-unless-interrupted`](https://zmk.dev/docs/behaviors/hold-tap#flavors) in [#1018](https://github.com/zmkfirmware/zmk/pull/1018) which works very well with the new positional hold-tap config.
[okke-formsma] implemented [`retro-tap` hold-tap property](https://zmk.dev/docs/behaviors/hold-tap#retro-tap) in [#667](https://github.com/zmkfirmware/zmk/pull/667)
[okke-formsma] _also_ added [`quick-tap-ms` hold-tap property](https://zmk.dev/docs/behaviors/hold-tap#quick-tap-ms) in [#655](https://github.com/zmkfirmware/zmk/pull/655)
### Apple Device Compatibility Improvements
#### Pairing
[petejohanson] did some sleuthing and fixed a long standing problem with inconsistent pairing with macOS in [#946]](https://github.com/zmkfirmware/zmk/pull/946). With the changes, macOS more reliably pairs with ZMK devices.
#### Consumer (Media) Codes
Another persistent bug that Apple users experienced was related to crashes and problems with keyboard configurations, that was traced to an issue with ZMK's HID usage that was fixed by [petejohanson] in [#726](https://github.com/zmkfirmware/zmk/pull/726).
### Debounce Enhancements
[joelspadin] applied some major enhancements to our [debouncing](/docs/features/debouncing) approach to allow fine grained control of our debouncing in [#888](https://github.com/zmkfirmware/zmk/pull/888), including allowing [eager debouncing](/docs/features/debouncing#eager-debouncing) which can reduce key press latency.
### Split Improvements
#### Behavior Locality
The long awaited locality enhancement was finally merged by [petejohanson] in [#547](https://github.com/zmkfirmware/zmk/pull/547), allowing more fine grained control of where certain behaviors are invoked. Some key improvements thanks to the changes:
- [RGB Underglow](/docs/features/underglow) behaviors now run globally, so enabling/disabling RGB, changing the color, animation, etc. applies to both sides of a split properly.
- [Reset](/docs/behaviors/reset#reset)/[Bootloader](/docs/behaviors/reset#bootloader-reset) behaviors now run wherever the key was pressed. For example, adding a `&bootloader` reference to the peripheral side of a split will now put that side of the split into the bootloader when pressed.
#### Split Connections
[petejohanson] also added fixes to improve split re-connection for certain scenarios in [#984](https://github.com/zmkfirmware/zmk/pull/984), helping ensure splits properly connect when one side or the other is reset.
### Hardware Support
#### Backlight
[bortoz](https://github.com/bortoz) added [single color backlight support](/docs/features/backlight) in [#904](https://github.com/zmkfirmware/zmk/pull/904) for those keyboards that have it as an alternative to RGB underglow.
#### E-Paper Display (EPD) Driver
[petejohanson] worked with [LOWPROKB](https://github.com/LOWPROKB) to add support for the E-Paper Displays (EPD) in [#895](https://github.com/zmkfirmware/zmk/pull/895) used in keyboards like the Corne-ish Zen.
#### nRF VDDH Battery Sensing
[joelspadin] added a new sensor driver to support battery charge calculation by sensing voltage on the VDDH pin on nRF52 chips in [#750](https://github.com/zmkfirmware/zmk/pull/750), which is particularly useful for designs
using "high voltage mode" with that SoC.
### Miscellaneous
#### Documentation
[dxmh] and [caksoylar](https://github.com/caksoylar) have joined the ZMK organization to help with documentation, and have been doing an amazing job adding new docs, and leading reviewing docs related PRs to free other contributors up to focus on other areas. It's been an incredible addition to ZMK!
#### NKRO Support
[petejohanson]'s work on the HID foundation also included adding support for full NKRO HID in [#726](https://github.com/zmkfirmware/zmk/pull/726) that can be enabled by adding the following to your `.conf` file for your config:
```ini
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
```
#### Power Profiler
It's been live for a while, but [nicell] added an amazing [power profiler](/power-profiler) in [#312](https://github.com/zmkfirmware/zmk/pull/312) to allow users to estimate their battery life for various hardware configurations.
#### Min/Max Underglow Brightness
[malinges](https://github.com/malinges) added support for configuring min/max underglow brightness in [#944](https://github.com/zmkfirmware/zmk/pull/944) by setting the values in your `.conf` file as percentages of full:
```ini
CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=20
CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80
```
This can be useful to be sure that lowering brightness doesn't set the brightness to zero, and raising the brightness doesn't consume too much power.
#### Zephyr 3.0
[petejohanson] helped prepare and test the upgrade of ZMK to Zephyr 3.0 in [#1143](https://github.com/zmkfirmware/zmk/pull/1143). The updated Zephyr release brings with it some key BLE stability fixes, as well as various other core improvements that improve ZMK. This was a huge undertaking!
## New Shields
- Contra in [#633](https://github.com/zmkfirmware/zmk/pull/633) - [iangus](https://github.com/iangus)
- Naked60 in [#681](https://github.com/zmkfirmware/zmk/pull/681) - [xiushak](https://github.com/xiushak)
- Murphpad in [#806](https://github.com/zmkfirmware/zmk/pull/806) - [kylemccreery](https://github.com/kylemccreery)
- A. Dux in [#951](https://github.com/zmkfirmware/zmk/pull/951) - [dxmh]
- Bat43 in [#956](https://github.com/zmkfirmware/zmk/pull/956) - [dnaq](https://github.com/dnaq)
- Zodiark in [#959](https://github.com/zmkfirmware/zmk/pull/959) - [Aleblazer](https://github.com/Aleblazer)
- Osprette in [#974](https://github.com/zmkfirmware/zmk/pull/974) - [smores56](https://github.com/smores56)
- Knob Goblin in [#990](https://github.com/zmkfirmware/zmk/pull/990) - [lucasuyezu](https://github.com/lucasuyezu)
- Redox in [#1002](https://github.com/zmkfirmware/zmk/pull/1002) - [toddmok](https://github.com/toddmok)
- Elephant42 in [#1009](https://github.com/zmkfirmware/zmk/pull/1009) - [filoxo](https://github.com/filoxo)
- Chalice in [#1022](https://github.com/zmkfirmware/zmk/pull/1022) - [joshajohnson](https://github.com/joshajohnson)
- Boardsource 5x12 in [#1027](https://github.com/zmkfirmware/zmk/pull/1027) - [fsargent](https://github.com/fsargent)
- Jiran in [#1048](https://github.com/zmkfirmware/zmk/pull/1048) - [krikun98](https://github.com/krikun98)
- keeb.io Fourier in [#1056](https://github.com/zmkfirmware/zmk/pull/1056) - [TheButlah](https://github.com/TheButlah)
- Lotus58 in [#1090](https://github.com/zmkfirmware/zmk/pull/1090) - [nettema](https://github.com/nettema)
- Clog in [#1092](https://github.com/zmkfirmware/zmk/pull/1092) - [smores56](https://github.com/smores56)
- Kyria rev2 in [#1112](https://github.com/zmkfirmware/zmk/pull/1112) - [petejohanson]
- Leeloo in [#1165](https://github.com/zmkfirmware/zmk/pull/1165) - [ClicketySplit](https://github.com/ClicketySplit)
- 2% Milk in [#1135](https://github.com/zmkfirmware/zmk/pull/1135) - [kurtis-lew]
## New Boards
- Ferris rev02 in [#642](https://github.com/zmkfirmware/zmk/pull/642) - [petejohanson]
- nice!60 in [#810](https://github.com/zmkfirmware/zmk/pull/810) - [nicell]
- nice!nano v2 in [#867](https://github.com/zmkfirmware/zmk/pull/867) - [nicell]
- Mikoto 520 in [#985](https://github.com/zmkfirmware/zmk/pull/985) - [mrninhvn](https://github.com/mrninhvn)
- S40NC in [#1021](https://github.com/zmkfirmware/zmk/pull/1021) - [kylemccreery](https://github.com/kylemccreery)
- BT60 in [#1029](https://github.com/zmkfirmware/zmk/pull/1029) - [ReFil](https://github.com/ReFil)
- Seeeduino XIAO BLE (as part of the Zephyr 3.0 work) in [#1143](https://github.com/zmkfirmware/zmk/pull/1143) - [petejohanson]
## Board/Shield Metadata
[nicell] and [petejohanson] worked together in [#883](https://github.com/zmkfirmware/zmk/pull/883) to settle on a [metadata format](/docs/development/hardware-metadata-files) that is used to document every board and shield. This now drives automatic generation of our [supported hardware](/docs/hardware) page and our
more nuanced GH Actions automation for testing changes to ZMK.
## Coming Soon!
Some items listed in the last coming soon section are still under active development.
- RP2040 support
- Peripheral rotary encoder support
- Caps/Scroll/Num Lock LED support
- Mouse Keys
- Wired split support
- More modular approach to external boards/shields, custom code, user keymaps, etc.
- More shields and boards
## Statistics
Some statistics of interest for ZMK:
- GitHub (lifetime stats)
- 105 Contributors
- 791 Closed PRs
- 849 Stars
- 832 Forks
- Discord Chat
- 3430 total registered
- Website (last 30 days)
- 35.9K page views
- 3.29K new users
## Thanks!
As we approach the two year birthday for ZMK, I am reminded of how far we have come in such a short time, in large part thanks to the _amazing_ community that has grown around it. I am so grateful to have so many contributors, testers, and user believing in the project and helping make it a joy to work on.
[okke-formsma]: https://github.com/okke-formsma
[mcrosson]: https://github.com/mcrosson
[nicell]: https://github.com/Nicell
[petejohanson]: https://github.com/petejohanson
[kurtis-lew]: https://github.com/kurtis-lew
[joelspadin]: https://github.com/joelspadin
[bcat]: https://github.com/bcat
[dxmh]: https://github.com/dxmh
## Article Updates
- 12/2023: Removed the deprecated `label` property from code snippets.