From 9fe1793691cbfbde734a069a4f361ae2354692dd Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 9 Nov 2020 12:01:53 -0500 Subject: [PATCH 1/4] feat(blog): SOTF #3 --- docs/blog/2020-08-12-zmk-sotf-1.md | 2 +- docs/blog/2020-09-21-zmk-sotf-2.md | 2 +- docs/blog/2020-11-09-zmk-sotf-3.md | 156 +++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 docs/blog/2020-11-09-zmk-sotf-3.md diff --git a/docs/blog/2020-08-12-zmk-sotf-1.md b/docs/blog/2020-08-12-zmk-sotf-1.md index 8a3ca7c6..b5b2046d 100644 --- a/docs/blog/2020-08-12-zmk-sotf-1.md +++ b/docs/blog/2020-08-12-zmk-sotf-1.md @@ -1,5 +1,5 @@ --- -title: ZMK State Of The Firmware \#1 +title: "ZMK State Of The Firmware #1" author: Pete Johanson author_title: Project Creator author_url: https://gitlab.com/petejohanson diff --git a/docs/blog/2020-09-21-zmk-sotf-2.md b/docs/blog/2020-09-21-zmk-sotf-2.md index 82278add..06c64f02 100644 --- a/docs/blog/2020-09-21-zmk-sotf-2.md +++ b/docs/blog/2020-09-21-zmk-sotf-2.md @@ -1,5 +1,5 @@ --- -title: ZMK State Of The Firmware \#2 +title: "ZMK State Of The Firmware #2" author: Pete Johanson author_title: Project Creator author_url: https://gitlab.com/petejohanson diff --git a/docs/blog/2020-11-09-zmk-sotf-3.md b/docs/blog/2020-11-09-zmk-sotf-3.md new file mode 100644 index 00000000..71a53400 --- /dev/null +++ b/docs/blog/2020-11-09-zmk-sotf-3.md @@ -0,0 +1,156 @@ +--- +title: "ZMK State Of The Firmware #3" +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 third ZMK "State Of The Firmware" (SOTF)! + +This update will cover all the major activity since [SOTF #2](/blog/2020/09/21/zmk-sotf-2). This edition comes a bit later than planned, but the amount of features and changes will hopefully make it worth it! + +## Recent Activity + +Here's a summary of the various major changes since last time, broken down by theme: + +### Keymaps/Behaviors + +Tons of activity related to keymaps, so we'll go into more detail this time. + +#### Codes Overhaul + +[innovaker] _completely_ overhauled the set of available codes for keymaps, and simultaneously has created +_beautiful_ [documentation](/docs/codes) to help users visualize the codes, and also understand if they are supported on their particular operating system. + +This also laid the foundation for the other keymap related changes that are now available. + +#### Modified (Shifted) Codes + +[okke-formsma] added the ability to apply modifiers to a code, e.g.: + +``` +&kp LC(C) +``` + +which sends `Control + c` when pressed. This feature is often used on smaller keyboards to achieve "shifted keycodes", e.g. `LS(N1)` to send a `!`. +To make this easier, in addition to all the normal codes, we now have defines for common shifted codes, e.g. `EXCL` for `!`, `AT` for `@`, etc. + +To learn more, check out the [Modifiers](/docs/codes/modifiers) documentation. + +#### Simplified Key Press Behavior + +In previous versions of ZMK, users needed to be careful to select between the `&kp` and `&cp` behaviors in their keymaps, depending on +whether the particular keycode they wanted to send was in the "HID consumer page" or not. Forcing users to understand the difference and get +this right was awkward and error prone. + +[petejohanson] and [innovaker] have reduced this complexity. Users can now simply use `&kp` with all available codes and ZMK will +handle sending the right events to the connected host. + +### Power Management + +Several important power management features have been added to ZMK, helping save power for many use cases. + +#### BLE Battery Level Reporting + +[Nicell] added the necessary [driver](https://github.com/zmkfirmware/zmk/pull/293) and [core code](https://github.com/zmkfirmware/zmk/pull/306) to send BLE battery level notifications to hosts that support displaying them. Testing seems to show this works with Windows and GNOME, but macOS does not display the battery info. + +#### External Power Control + +[megamind4089] added a new [driver](https://github.com/zmkfirmware/zmk/pull/242) and [behavior](https://github.com/zmkfirmware/zmk/pull/258) to allow users to toggle (on/off) the external power supplied by boards such as the nRFMicro +and nice!nano that have specialized hardware for this purpose. + +With this change, you can add + +``` +&ext_power EP_TOG +``` + +to toggle (on/off) the power to external hardware like RGB underglow or OLEDs. Check out the [external power control](/docs/behavior/power#external-power-control) docs for more info. + +#### Deep Sleep + +[petejohanson] has contributed the initial [deep sleep](https://github.com/zmkfirmware/zmk/pull/211) support to ZMK. This work also +included some automatic power savings by switching to PORT events on the nRF52 chips, which reduces the idle power draw, even without deep sleep. Deep sleep is currently not turned on by default, but will be soon. + +### Miscellaneous + +#### Output Selection + +[joelspadin] added [output selection](/docs/behavior/outputs) to allow selecting whether to send output over USB or BLE if both are connected. This should now help avoid having "double keypresses" when your keyboard is plugged into a host. + +#### Bootloader Corruption Fix + +[Nicell] has already [blogged about this](/blog/2020/10/03/bootloader-fix), but for those that missed it, a _major_, and incredibly difficult to pin down bug involving corruption of the bootloader on devices using the Adafruit nRF52 bootloader has been fixed by [Nicell]. If you've encountered this bug, flashing the latest firmware should prevent it from reoccurring. Unfortunately, due to the nature of this fix, you will need to re-pair your keyboard with your hosts, as the fix involves changing where settings are stored in the flash of the controller. + +#### Official USB Product ID + +[petejohanson] has gotten an official [USB product ID](https://github.com/openmoko/openmoko-usb-oui/pull/15) assigned to the ZMK Firmware. For anyone looking to uniquely identify a USB device running the ZMK Firmware, you can match on: + +- Vendor ID: `0x1d50` +- Product ID: `0x615e` + +We are incredibly grateful that Openmoko Inc., in the wake of discontinuing the openmoko projects, has made this an option for OSS projects. + +#### Development: Remote Docker Container Integration + +[idan](https://github.com/idan) contributed [VSCode devcontainer integration](https://github.com/zmkfirmware/zmk/pull/209) to make it easier for developers to build and develop ZMK without having to do complicated local toolchain setup and configuration. This also opens up some amazing future flexibility for things like [GitHub Codespaces](https://twitter.com/ZMKFirmware/status/1315760616779505678?s=20). + +There's some follow up tweaks necessary for better supporting using this with user config repositories, which will be available soon. + +## New Shields + +- Reviung41 in [#297](https://github.com/zmkfirmware/zmk/pull/297) - [Nicell] +- Boardsource 3x4 in [#296](https://github.com/zmkfirmware/zmk/pull/296) - [neegool](https://github.com/neegool) +- NIBBLE in [#292](https://github.com/zmkfirmware/zmk/pull/292) - [jaygreco](https://github.com/jaygreco) +- Microdox in [#245](https://github.com/zmkfirmware/zmk/pull/245) - [careyk007](https://github.com/careyk007) +- MakerDiary M60 in [#233](https://github.com/zmkfirmware/zmk/pull/233) - [megamind4089] +- TGX4 in [#226](https://github.com/zmkfirmware/zmk/pull/226) - [mubeenkhan94](https://github.com/mubeenkhan94) +- Querfrency V1 in [#216](https://github.com/zmkfirmware/zmk/pull/216) - [noar-t](https://github.com/noar-t) +- Cradio in [#224](https://github.com/zmkfirmware/zmk/pull/224) - [davidphilipbarr](https://github.com/davidphilipbarr) +- Romac+ in [#198](https://github.com/zmkfirmware/zmk/pull/198) - [reizero00](https://github.com/reizero00) + +## New Boards + +- MakerDiary nRF52840 M.2 Module in [#233](https://github.com/zmkfirmware/zmk/pull/233) - [megamind4089] + +## Testing + +There has been an _amazing_ amount of testing from various users as we develop new features. In particular, we'd like to give a shout out to [tominabox1](https://github.com/tominabox1) who has been tireless in providing detailed and thorough testing of +changes as they are being developed. + +## Coming Soon! + +Some items listed in the last coming soon section are still under active development. + +- OLED work, including battery and USB/BLE connection status - [petejohanson] +- One shot mod/layer behaviors - [okke-formsma] +- A power profiler page for the website, to help users estimate their battery life for a given keyboard - [Nicell] +- A keymap converter to automatically update keymaps to the new codes and use of `&kp` everywhere - [joelspadin] + +## Statistics + +Some statistics of interest for ZMK: + +- GitHub (lifetime stats) + - 210 Closed PRs + - 116 Stars + - 101 Forks +- Discord Chat + - 363 total registered +- Website (last 30 days) + - 8.5K page views + - 766 new users + +## Thanks! + +Thanks again to the numerous contributors and users who have made working on ZMK such a pleasure! + +[okke-formsma]: https://github.com/okke-formsma +[nicell]: https://github.com/Nicell +[petejohanson]: https://github.com/petejohanson +[brainwart]: https://github.com/BrainWart +[innovaker]: https://github.com/innovaker +[megamind4089]: https://github.com/megamind4089 +[joelspadin]: https://github.com/joelspadin From edcfe380fed90d4cadd1d1594852fcb571385446 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 9 Nov 2020 17:00:52 -0500 Subject: [PATCH 2/4] fix(blog): Quefrency typo fix. --- docs/blog/2020-11-09-zmk-sotf-3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/blog/2020-11-09-zmk-sotf-3.md b/docs/blog/2020-11-09-zmk-sotf-3.md index 71a53400..8752065b 100644 --- a/docs/blog/2020-11-09-zmk-sotf-3.md +++ b/docs/blog/2020-11-09-zmk-sotf-3.md @@ -107,7 +107,7 @@ There's some follow up tweaks necessary for better supporting using this with us - Microdox in [#245](https://github.com/zmkfirmware/zmk/pull/245) - [careyk007](https://github.com/careyk007) - MakerDiary M60 in [#233](https://github.com/zmkfirmware/zmk/pull/233) - [megamind4089] - TGX4 in [#226](https://github.com/zmkfirmware/zmk/pull/226) - [mubeenkhan94](https://github.com/mubeenkhan94) -- Querfrency V1 in [#216](https://github.com/zmkfirmware/zmk/pull/216) - [noar-t](https://github.com/noar-t) +- Quefrency V1 in [#216](https://github.com/zmkfirmware/zmk/pull/216) - [noar-t](https://github.com/noar-t) - Cradio in [#224](https://github.com/zmkfirmware/zmk/pull/224) - [davidphilipbarr](https://github.com/davidphilipbarr) - Romac+ in [#198](https://github.com/zmkfirmware/zmk/pull/198) - [reizero00](https://github.com/reizero00) From 972158181d33b268c2e5ec4860742dcbfe4f0e5c Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 10 Nov 2020 11:20:17 -0500 Subject: [PATCH 3/4] fix(shields): Replace Corne w/ Microdox. --- app/boards/shields/microdox/microdox.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/microdox/microdox.conf b/app/boards/shields/microdox/microdox.conf index b79385bd..253c94e4 100644 --- a/app/boards/shields/microdox/microdox.conf +++ b/app/boards/shields/microdox/microdox.conf @@ -1,6 +1,6 @@ -# Uncomment the following lines to enable the Corne RGB Underglow +# Uncomment the following lines to enable the Microdox RGB Underglow # ZMK_RGB_UNDERGLOW=y # CONFIG_WS2812_STRIP=y -# Uncomment the following line to enable the Corne OLED Display +# Uncomment the following line to enable the Microdox OLED Display # CONFIG_ZMK_DISPLAY=y From 348a44a8a387e38922e7e275b1ba9af790648016 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Sun, 8 Nov 2020 11:37:18 +0000 Subject: [PATCH 4/4] refactor(app): Remove obsolete include's of `hid_usage_pages.h` This should've been done in eff1b8223b5010d526914530c5d1d469eff356df. --- app/dts/behaviors/key_press.dtsi | 2 -- app/dts/behaviors/sensor_rotate_key_press.dtsi | 2 -- app/src/hid.c | 1 - 3 files changed, 5 deletions(-) diff --git a/app/dts/behaviors/key_press.dtsi b/app/dts/behaviors/key_press.dtsi index 77050aaa..e0668327 100644 --- a/app/dts/behaviors/key_press.dtsi +++ b/app/dts/behaviors/key_press.dtsi @@ -1,6 +1,4 @@ -#include - / { behaviors { /* DEPRECATED: `cp` will be removed in the future */ diff --git a/app/dts/behaviors/sensor_rotate_key_press.dtsi b/app/dts/behaviors/sensor_rotate_key_press.dtsi index 54339945..d06eca23 100644 --- a/app/dts/behaviors/sensor_rotate_key_press.dtsi +++ b/app/dts/behaviors/sensor_rotate_key_press.dtsi @@ -1,6 +1,4 @@ -#include - / { behaviors { /* DEPRECATED: `inc_dec_cp` will be removed in the future */ diff --git a/app/src/hid.c b/app/src/hid.c index 7e733d96..b84a693f 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -9,7 +9,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include -#include static struct zmk_hid_keypad_report kp_report = { .report_id = 1, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}};