Newer Zephyr uses a different Kconfig value to control buffers for GATT
client discovery, so adjust our defaults to bump the correct value
Fixes: #3156
refactor(core): Adjust our approach for upstream Zephyr boards
Move to using proper HWMv2 board extensions
https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#board-extensions
for extending upstream Zephyr boards for use with ZMK. With this change,
using upstream Zephyr board IDs directly, e.g. `seeeduino_xiao` will be
stock versions as found upstream. To use a board variant that is tuned
for ZMK use, use the `zmk` variant, e.g. `seeeduino_xiao//zmk` which is
shorthand for `seeeduino_xiao/samd21g18a/zmk`.
refactor(boards): Move to ZMK specific variants for the nRFMicro board
For consistency, adjust the nRFMicro board definition to offer a
"vanilla" Zephyr board, and then ZMK variants, e.g.
`nrfmicro/nrf52840/zmk`.
refactor(boards): Move to ZMK specific variant for the bluemicro840 board
For consistency, adjust the bluemicro840 board definition to offer a
"vanilla" Zephyr board, and then ZMK variant, e.g. `bluemicro840//zmk`.
refactor(boards): Make tofu65 to ZMK variant by default
Make the standard Tofu65 board ID be `tofu65/rp2040/zmk` or
`tofu65//zmk` by shorthand.
refactor(boards): Move BDN9 to ZMK variant by default
Make the standard BDN9 board ID be `bdn9/stm32f072xb/zmk` or
`bdn9//zmk` by shorthand.
refactor(boards): Move Puchi BLE to ZMK variant by default
Make the standard Puchi BLE board ID be `puchi_ble/nrf52840/zmk` or
`puchi_ble//zmk` by shorthand.
refactor(boards): Move Adv360 Pro to ZMK variant by default
Make the standard Adv360 Pro board ID be `adv360pro_left/nrf52840/zmk` or
`adv360pro_left//zmk` by shorthand and for right as well.
refactor(boards): Move nRF52840 M2 to ZMK variant by default
Make the standard nRF52840 M2 board ID be `nrf52840_m2/nrf52840/zmk` or
`nrf52840_m2//zmk` by shorthand.
refactor(boards): Move Pillbug to ZMK variant by default
Make the standard Pillbug board ID be `pillbug/nrf52840/zmk` or
`pillbug//zmk` by shorthand.
refactor(boards): Move s40nc to ZMK variant by default
Make the standard s40nc board ID be `s40nc/nrf52840/zmk` or
`s40nc//zmk` by shorthand.
refactor(boards): Move nice!60 to ZMK variant by default
Make the standard nice!60 board ID be `nice60/nrf52840/zmk` or
`nice60//zmk` by shorthand.
refactor(boards): Move planck to ZMK variant by default
Make the standard planck board ID be `planck/stm32f303xc/zmk` or
`planck//zmk` by shorthand.
refactor(boards): Move preonic to ZMK variant by default
Make the standard preonic board ID be `preonic/stm32f303xc/zmk` or
`preonic//zmk` by shorthand.
refactor(boards): Move ferris to ZMK variant by default
Make the standard ferris board ID be `ferris/stm32f072xb/zmk` or
`ferris//zmk` by shorthand.
refactor(boards): Move Proton-C to ZMK variant by default
Make the standard Proton-C board ID be `proton_c/stm32f303xc/zmk` or
`proton_c//zmk` by shorthand.
refactor(boards): Move Corneish Zen to ZMK variant by default
Make the standard Corneish Zen board ID be `corneish_zen_left/nrf52840/zmk` or
`corneish_zen_left//zmk` by shorthand and for right as well.
refactor(boards): Move nice!nano to ZMK variant by default
Make the standard nice!nano board ID be `nice_nano/nrf52840/zmk` or
`nice_nano//zmk` by shorthand.
refactor(boards): Move mikoto to ZMK variant by default
Make the standard mikoto board ID be `mikoto/nrf52840/zmk` or
`mikoto//zmk` by shorthand.
refactor(boards): Move Polarity Works boards to ZMK variants
Make the standard Polarity Works board IDs be `zmk` variants.
doc: Update docs/blog post to reference ZMK variants
* Update Zephyr 4.1 blog post to mention ZMK variants
* Add note to hardware support page about variants
docs: Fix up shield board overlays for new board IDs
Adjust our documentation to properly use the correct qualified board
overlay file names that match our new board conventions.
feat(endpoints): add "no endpoint" value
This adds ZMK_TRANSPORT_NONE, which can be set as the preferred
endpoint transport if you wish to prevent the keyboard from sending any
output. More usefully, it also is used to indicate that the preferred
endpoint is not available and it could not fall back to an available
one. To go along with this, many endpoint functions are renamed for
consistency, and a few new functions are added:
- zmk_endpoint_get_preferred_transport() returns the value that was set
with zmk_endpoint_set_preferred_transport().
- zmk_endpoint_get_preferred() returns the endpoint that will be used
if it is available. This endpoint always has the same transport as
zmk_endpoint_get_preferred_transport().
- zmk_endpoint_is_connected() is a shortcut to check if the keyboard is
actually connected to an endpoint.
This change is based on #2572 but without the option to disable endpoint
fallback. It does refactor code to allow adding that feature later.
fix(endpoints): Add endpoint setting upgrade
Adding ZMK_TRANSPORT_NONE at the start of enum zmk_transport results in
the preferred transport setting no longer representing the same values
when it is saved with earlier firmware and loaded with newer firmware.
To fix this, the "endpoints/preferred" setting is now deprecated and
replaced by "endpoints/preferred2". If the old setting is present, it
is interpreted as the old enum type, upgraded to the new type, and saved
immediately to the new setting. The old setting is then deleted.
To avoid this happening again in the future, enum zmk_transport now has
explicit values assigned to identifier, and a comment is also added to
explain that existing values must not be changed.
fix: Set default transport according to enabled transports
The default value for preferred_transport is now set to USB only if
CONFIG_ZMK_USB is enabled. If not, it falls back to BLE if
CONFIG_ZMK_BLE is enabled, then to "none" if nothing is enabled.
* fix(docs): Improve link and code highlight contrast
Reset the theme's primary colors to the defaults, since the color of
links was a bit too low contrast in the dark theme. The default primary
color is a very similar but slightly lighter shade of blue.
The background color of highlighted lines in code blocks is also fairly
low contrast, but it needs to be in order to keep the text readable. To
add contrast here, we now add a colored block to the left side of a
highlighted line.
* fix(docs): Improve ZMK setup instructions
This makes several improvements to the instructions for installing and
using ZMK CLI:
- Windows Terminal is also named "Terminal", so reworded the terminal
instructions to not separate Windows from other OSes.
- Specified that Windows Terminal should always be used on Windows, as
on older installations of Windows, the default terminal when opening
PowerShell may be the legacy console host, which may not support some
of the VT sequences used by ZMK CLI.
- Switched from pipx to uv. This eliminates the need for instructions
on installing Python, as uv will automatically install a supported
version of Python if needed.
- Updated the instructions for running "zmk init", as ZMK CLI version
0.4.0 switched from immediately asking for a repo URL to prompting
the user to select between creating a new repo or cloning an existing
one first.
- Since for a new user, having a keymap compile successfully on the
first attempt after modifying it may be the exception rather than the
norm, added a note about error messages in GitHub actions with a link
to the troubleshooting page.
Also added instructions for updating ZMK CLI to the latest version on
the ZMK CLI page.
With the binding referenced to as uint8_t the keymap would be incorrect if more than 256 positions were in use, going to a uint16_t gives large enough headroom to not have to worry
deps: Use hal_stm32 with stm32c0 USB device fixes.
Pull in ZMK fork of hal_stm32 with USB device driver fixes for stm32c0.
feat: Add nBOOT_SEL bit setup for STM32 G0/C0 targets
Newer STM32 C0 and G0 series SoCs do not by default allow use of the
BOOT0 pin/button to enter the bootloader once something has been flash
to the device, which is a change from previous series, and usually not
what's wanted for keyboards running ZMK. To address this, add some
optional, but default initialization code to check the nBOOT_SEL bit and
override it if necessary to ensure BOOT pin/button functionality.
docs: Extract bootloader config into a dedicated page.
Pull the bootloader intergration options out of the system configuration
page into their own dedicated one.
Co-authored-by: Nicolas Munnich <98408764+nmunnich@users.noreply.github.com>
---------
Co-authored-by: Nicolas Munnich <98408764+nmunnich@users.noreply.github.com>
The static mouse_report definition did not initialize the d_scroll_x
field. The zmk_hid_mouse_report_body structure contains five fields
(buttons, d_x, d_y, d_scroll_y, d_scroll_x), but d_scroll_x was left
uninitialized.
Initialize d_scroll_x to 0 to ensure all fields in the mouse report
are properly initialized and avoid potential undefined behavior.
The RX buffer was previously defined as [RX_BUFFER_SIZE/2][2], which
created (RX_BUFFER_SIZE/2) small 2-byte buffers instead of the two
(RX_BUFFER_SIZE/2)-byte buffers required for DMA ping-pong operation.
Update the buffer definition to [2][RX_BUFFER_SIZE/2] and apply the
fix to both the central and peripheral wired split implementations.
This prevents potential DMA RX data corruption when using async UART.
Enable ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 for
nRF52833, add nrf52833_uf2_boot_mode.dtsi as a copy of the nRF52840 file
for easy inclusion.
Enable retention for all nrfmicro subvariants (as this is the only
in-tree board that uses the nRF52833).
This fixes &bootloader for nRF52833 boards post-4.1 upgrade.
ZMK doesn't use SOF. Disable this to prevent unexpected USB
disconnection. The disconnection is observed under 3 circumstances on a
Linux host:
1. Keyboard just performed a firmware upgrade and USB is kept connected.
2. Keyboard is woken from USB power source and USB is kept connected.
3. Keyboard is connected when host is booting, and when Linux is just
initialized.
Disabling SOF processing will not affect boot protocol switching.
Tested on Makerdiary M60.
Adds support for building the firmware in the config-repo locally via
[act](https://github.com/nektos/act).
Linux example command:
```shell
act --artifact-server-path $PWD/.artifacts
```
MacOS (M2) example command:
```shell
act --artifact-server-path $PWD/.artifacts \
--container-architecture \
linux/amd64 --container-daemon-socket -
This deletes the Bash and PowerShell setup scripts in favor of using
ZMK CLI. The old setup scripts are broken, since the config repo
template uses ZMK version 0.3, while the setup scripts use hardware
metadata from the main branch. ZMK CLI doesn't have this issue, because
it clones the version of ZMK listed in the config repo to get hardware
metadata.
Much of the "Installing ZMK" page has been rewritten to give
instructions for installing ZMK CLI and using it to create and modify
a config repo. The previously-hidden page on ZMK CLI has been added to
the sidebar and repurposed into general documentation for the tool.
Zephyr now has some modules that get placed under /optional/modules
instead of /modules. Added that to .gitignore so Git doesn't try to
treat those like Git modules.
The original condition was always true, this commit fixes the condition
to correctly handle the remainder for sensor rotation behaviors by using
abs().
Co-authored-by: schuay <schuay@users.noreply.github.com>
* tempfile necessary because running build command makes directory pristine,
interfering with the build log being written.
* Should be automatically picked up by the artifacts in CI tests
refactor: Move to Zephyr v4.1.0
Move to Zephyr v4.1.0, with various build/compilation fixes needed for
basic use.
refactor(tests): Move to native_sim for tests.
feat(core): (Optionally) use Zephyr keyboard input devices
Add ability to assign a keyboard `input` device to a physical layout,
or use a chosen `zmk,matrix-input`.
fix(pointing): Refactor for changes to input API
Pass NULL user_data to input callbacks.
fix(tests): Fix BLE test to account for Zephyr changes
Handle additional read callback invocation once all matching
characteristic have been read.
fix(sensors): Initialize sensor data to 0 before fetching.
Be sure we don't get back any uninitialized data by initializing
the channel data to 0 before calling into the sensor API.
refactor(input): Adjust split input to input API changes.
Input callbacks now have a user_data parameter, adjust accordingly.
chore(bluetooth): Minor cleanup of split BT code after refactor
Small fixes and remove commented dead code left after the split
refactor.
refactor: Fix up BLE tests after Zephyr upgrade.
Minor changes to snapshots based on newer Zephyr version.
refactor(boards): Move to upstream xiao_ble board ID.
Move to official upstream board definition for the Seeed XIAO BLE.
refactor: Adjust metadata schema for HWMv2 board IDs w/ qualifiers
Adjust our ZMK metadata to allow for board IDs that include qualifiers
with slash delimeters.
refactor!(boards): Move nice!nano to HWMv2, and proper revisioning
Upgrade the nice!nano board to HWMv2, under the proper nicekeyboards
vendor directory, and with proper revisions. Includes a breaking change
to default the `2.0.0` version instead of the much older v1 (`1.0.0`).
fix: Disable Nordic dt-bindings header checks.
Disable the recently added Nordic dt-bindings header checks, which cause
issues for our HID related headers.
fix(studio): Correct `memset` usage.
Use the correct memset call to clear our RPC memory.
fix: Refactor for new Zephyr PM API
Adjustments to our PM code to match Zephyr PM APIs.
refactor(ble): Use correct BT opt for connectable.
Adjust for upstream Zephyr BT API changes for advertising options.
refactor(boards): Move MakerDiary M2 board to HWMv2.
Run the HWMv2 script to convert the MakerDiary M2 board.
fix(studio): Correct usage of thread analyzer API
Fix up the RPC code that invoke the thread analyzer API to account for
API changes.
chore: Remove nanopb module override.
Leverage nanopb version that's used by Zephyr.
feat(core): mapper for magic bootloader values.
To trigger bootloaders that use a magic value in RAM to trigger
bootloader mode, add a mapping retained memory driver that maps
write/read of boot mode values to a special magic value stored
in the actually backing RAM.
feat(behaviors): Add retention boot mode to reset.
Support new generic Zephyr retention boot mode API in the reset
behavior.
feat: Add double tap to enter bootloader functionality
Add ability to enter the bootloader if double tapping reset within the
specified window.
refactor(CI): Move to 4.1 container tags.
Move to the new 4.1 tagged container, to ensure updated SDK, Python
packages, etc.
refactor(boards): Move nRFMicro to HWMv2
Refactor nRFMicro to HWMv2, using proper SoC, revisions, and variants
(for flipped). Also move to devicetree setup of DCDC/HV DCDC.
refactor(boards): Move QMK Proton-C to HWMv2
Move Proton-C to HWMv2 for use with Zephyr 4.1.
chore(ci): Adjust core coverage for new board IDs.
Use correct board IDs, with qualifiers, for our core coverage testing.
refactor(boards): Move BDN9 to HWMv2
Move BDN9 to HWMv2, using the base `bdn9` ID, no longer including the
`_rev2` suffix in the ID.
refactor(boards): Move nice!60 to HWMv2
Migrate nice!60 to HWMv2.
refactor: Adjust how we're searching/loading keymap files
Use new post_boards_shields extension point for loading keymap files
from board/shield directories.
refactor(boards): Move planck rev6 to HWMv2.
Move Planck board definition to HWMv2, including versioning tweaks.
refactor(boards): Move OLKB Preonic to HWMv2
Move Preonic board definition to HWMv2 and remove `_rev3` variant
suffix in favor of board versioning with `3.0.0` as the default.
chore(deps): Pull in Zephyr optional group for nanopb.
Ensure we enable nanopb by adding +optional group filter.
fix(ci): Prevent slash characters in artifact names.
Move to HWMv2 means board IDs often include slashes, so replace those
with underscores when doing file uploads.
fix(usb): Adjust Kconfig settings for USB.
* Ensure USB isn't initialized automatically before we do, which can
happen if USB CDC logging is used/enabled for a given board.
* Adjust USB HID to initialize the USB class/interface before we enable
the USB device itself.
fix(display): Fix setting the small font for the mono theme.
Adjust for modified mono theme init function to pass the small font.
chore(ci): Fix changed board IDs for core coverage.
Adjust board IDs for our core coverage after move to HWMv2 and board
versioning consistently.
* planck_rev6 -> planck
* bdn9_rev2 -> bdn9
fix(underglow): Remove use of removed Kconfig WS2812 symbol
refactor(boards): Move PW CKP boards to HWMv2
Migrate the bt60, bt65, and bt75 to HWMv2.
refactor(boards): Move Puchi BLE to HWMv2
Migrate the Puchi BLE to HWMv2.
refactor(boards): Migrate Ferris rev02 to HWMv2.
Move Ferris rev02 to HMWv2, and remove the revision from the ID.
refactor(boards): Move Pillbug to HWMv2
Migrate the MechWild PillBug board to HWMv2.
refactor(boards): Migrate s40nc to HWMv2
Move the ShortyFortyNoCordy (s40nc) to HWMv2.
refactor(boards): Move bluemicro840 board to HWMv2.
Migrate bluemicro840 board to HWMv2, set up boot mode retention.
fix(boards): Retore bootloader support on XIAO BLE.
Set up necessary boot mode/retention to properly set GPREGRET to trigger
Adafruit bootloader to run on the XIAO BLE.
refactor(boards): Move Adv360 Pro to HWMv2.
Migrate Adv360 Pro left/right to HWMv2.
refactor(boards): Move Glove80 to HMWv2
Refactor the MoErgo Glove80 left/right to HWMv2.
refactor(boards): Move Mikoto to HMWv2.
Migrate Mikoto to HWMv2, with non-exact matching, tweaks to I2C
selection to imply it for the 7.2.0 revision for the fuel gauge.
refactor(boards): Move kbdfans Tofu65 2.0 to HMWv2
Move Tofu65 2.0 to HMWv2, with ID of just `tofu65`.
refactor(boards): Remove dz60rgb board
Remove dz60rgb, it's no longer readily available and we have other
current stm32 reference designs for testing.
refactor(boards): Move Corneish Zen to HMWv2
Move Corneish Zen to HMWv2, with IDs of
`corneish_zen_left`/`corneish_zen_right`.
refactor(boards): Migrate Corne-ish Zen status screen
* refactor(boards): Add boot mode to the nice!nano using common dtsi
* Add a new .dtsi for setting up nRF52 boot mode/retained memory
settings
* Adjust XIAO BLE to use the new include file
* Add boot mode to to the nice!nano
refactor(boards): Add boot mode support to nice!60 board
Enable boot mode for nice!60 board.
refactor(boards): Adjust Zephyr board metadata file locations
Move the ZMK metadata files for upstream Zephyr boards to align with the
HWMv2 directory structure that uses the vendor ID for the parent
directory for a board directory.
fix: Don't enable ZMK Display by default for a few shields
By convention, avoid enabling ZMK Display by default on shields that may
be built with under-resourced controllers (e.g. nRF52833 based ones).
fix: Remove usage of renamed Kconfig from core coverage.
Avoid using WS2812_LED_STRIP, since that Kconfig was renamed/split into
SPI/GPIO/I2S symbols.
refactor(boards): Adjust XIAO RP2040 override names, bootloader support
Adjust the .conf/.overlay files to match the proper naming for the
XIAO rp2040 board. Also add the necessary Kconfig/DTS bits for
supporting bootloader using retained memory/boot mode retention.
fix(display): Adjust stack sizes for display usage.
Updated LVGL is bumping our stack size, so adjust the system work queue
and dedicated display queue stack sizes as needed to account for this.
feat(display): Add thread name to dedicated display queue.
When thread names are enabled, pass a name to the dedicated display
queue for better tracibility when using the thread analyzer.
docs(blog): Add Zephyr upgrade post
docs: Add bootloader integration page
Add a dedicated page to outline steps to set up bootloader integration
using the boot retention mechanism in newer Zephyr versions.
fix(display): port nice!view display code
* remove `lv_` prefix from old LVGL methods
doc: Update local setup docs to use `west packages pip`
Install Zephyr deps using the newer `west packages pip --install`.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
refactor(split): Adjust BT split code for newer Zephyr APIs.
refactor(boards): Adjust upstream RP2040 boards for boot mode retention
Add necessary DTS/Kconfig settings to upstream RP2040 boards so they can
use the ZMK bootloader functionality using the boot mode retention
infrastructure.
docs: Update Zephyr docs links to 4.1.0 version.
Update all links to the Zephyr docs to the 4.1.0 versions to match our
Zephyr version in use.
docs: Add a note about using CMake v3 for maximum compatibility.
Some optional modules, like libmetal, which is used on nRF5340,
specifically require CMake v3, so add a note in the native toolchain
setup about this.
feat(pointing): Handle INPUT_BTN_TOUCH codes for mouse buttons
Translate INPUT_BTN_TOUCH input codes into button 0 press/release for
HID layer.
chore(pointing): Clean up some warning messages.
Properly check return code from queue-ing messages, and fix up some type
warnings in our logging calls.
* Fix input event codes line numbers
fix(studio): Properly serialize GATT RPC indications.
fix(core): Set a system work queue stack size of 2048 by default
We use a fair amount of stack even without BLE or RP2040, so default to
2048 by default everywhere, and constrained platforms can lowes this if
they really need.
refactor(core): Move away from deprecated DIS Kconfig symbols
Use the correct Device Information Service Kconfig symbols for our model
number and manufacturer.
refactor: Move upstream Zephyr board overrides to extensions dirs
Newer Zephyr supports "board extensions" to formally do what we've added
in ourselves via some hacks, so move all our board overlay/config file
overrides for upstream Zephyr boards into that correct structure.
fix(boards): Add xiao_ble sd_partition label for nosd snippet compat
Upstream xiao_ble uses different naming convention for the partition
labels, so add an additional label for the SD range, so the existing
nrf52840-nosd snippet will still work with the board.
fix(core): Don't force CBPRINTF_NANO, for proper formatting.
The nano CBPRINTF implementation lacks some padded formatting needed to
ensure consistent formatting of BLE addresses, which we use to store
keys as strings in a few places, so use the complete CBPRINTF by default
now.
fix(boards): Remove some references to old nice_nano_v2 board ID.
The nice!nano board definition now properly uses versioning, so avoid
referring to it with old `nice_nano_v2` board ID.
fix(boards): Remove nano overlays for old nice_nano_v2 board ID.
With board versioning in place, we can remove the unused
`nice_nano_v2.overlay` files from shields.
---------
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Nicolas Munnich <munnich@lipn.univ-paris13.fr>
Co-authored-by: snoyer <noyer.stephane@gmail.com>
Add versions to the sidebar of the documentation, and when viewing the
deployment on zmk.dev, which tracks `main`, add a banner warning about
possibly prefering the docs for a particular stable release.
Properly use the BT_DEVICE_APPEARANCE Zephyr symbol to advertise
the correct appearance, allowing overrides, for e.g. mice.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Testing PASTE/COPY/CUT on macOS
Testing using ZMK Studio v0.3.1 to send these keys.
Using Karabiner-EventViewer, nothing from C_AC_CUT, C_AC_COPY, C_AC_PASTE, nor from paste special which I assume would be called C_AC_PASTE_SPECIAL (while for example C_AC_SEARCH was detected).
Did see K_CUT, K_COPY, K_PASTE, but they appear to do nothing by default.
* Add macOS footnote for editing keys K_CUT, K_COPY, K_PASTE
* Add macOS testing for K_UNDO, K_REDO etc.
C_AC_UNDO - not even registering as a keypress
K_UNDO - detected as a keypress, but no effect. Does not act like command+z
C_AC_REDO - not even registering as a keypress
K_AGAIN aka K_REDO - detected as a keypress, but no effect. Does not act like shift+command+z
* None of the six 'Input Assist' consumer keys work on macOS
Testing using ZMK Studio v0.3.1 to send these keys with macOS 15.6.1 (ARM),
and watching for keypresses with Karabiner-EventViewer v15.5.0.
* docs: Added a dedicated page on ZMK events
* docs: Apply suggestions from code review
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* docs: Apply suggestions from code review
Bring the code snipper in new-behavior back, touchups on the page
* docs: clarify "calling" hold tap
Adjustment after feedback from code review
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* feat(boards): Properly support settings for RPi Pico board.
* feat(shields): Add a tester_rpi_pico shield
---------
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
This adds additional required configs for the Nordic NRF52840 Dongle (PCA10059),
which was already supported by Zephyr, but didn't have flash settings
and Bluetooth enabled.
* Suggest using cu for USB log viewing on macOS
It may not be as friendly, but cu should be available while tio could be hard to install.
* Polish wording
Co-authored-by: Nicolas Munnich <98408764+nmunnich@users.noreply.github.com>
* Suggest "man cu" for how to use this tool
---------
Co-authored-by: Nicolas Munnich <98408764+nmunnich@users.noreply.github.com>
Solves issue #3019 (incorrect putty link)
- putty.org is not affiliated with the putty software
- the site now hosts links to interviews about a recent pandemic
- this pull request updates the link to the actual project page
Co-authored-by: Léon Hagenaars-Keus <lhagenaars@sogyo.nl>
* Use treeless clones in workflows
* Replace yaml2json with yq
Github's ubuntu runners come with `yq` installed, which can replace
piping `yaml2json` to `jq`. It also saves installing `yaml2json`.
It's worth noting that the `yq` version installed is the `go` version
(which has a slightly different syntax than the competing `python`
version).
Adds some encoder tests for rotating, and basic layers.
Mock Kscans don't seem to interact nicely, slightly on the hacky side.
However, better to have hacky tests than no tests.
Remove the previous condition on ZMK_SPLIT_WIRED that only enabled it if
!ZMK_BLE. We'll defer to the `depends on` to ensure the DTS exists to
use wired split to make that decision on enabling the feature.
Allow the nice!view widget to display the status of each profile by:
- not adding a circle around the number if the profile is not bound
- drawing a dashed circle around the number if a profile is bound but not connected
Given a typical setup of a battery at ~4 V and a nice!nano v2 running at
3.3 V, I measured a small increase in power usage (using a Nordic PPK2)
when SOC_DCDC_NRF52X_HV was enabled. This changes the nice_nano_v2 and
mikoto boards so this option is disabled by default.
Fixes#2990
* docs: Document requirements-extra.txt for Studio builds
* docs: Note endpoint selection requirement for Studio
* docs: Fix indents in list items in native setup page
Add this file to .prettierignore because it messes all the additional indents.
There is also no way to make prettier ignore a range of lines in MDX files AFAICT.
* Revert "docs: Fix indents in list items in native setup page"
This reverts commit 6d8aeba801.
Changed CONFIG_ZMK_STUDIO_TRANSPORT_UART to automatically enable itself
whenever a zmk,studio-rpc-uart chosen node is specified. The previous
behavior of enabling if CONFIG_ZMK_USB was enabled broke builds when
CONFIG_ZMK_STUDIO was enabled but the chosen node wasn't specified.
* blog: Add blog post on pinning ZMK version
* docs: apply suggestions from code review
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* docs: bump date for correctly pinned template
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
feat(split): Runtime selection of split transport
Allow building multiple split transports, and select an active
one based on the transport availability. Wired split availability
depends on additional `detect-gpios` which must be a GPIO pin
that goes active when a wired connection is present.
feat(split): Suspend/resume wired UART devices.
To better support runtime split support, suspend/resume the UART
as necessary to save power when not using the UART.
docs(split): Document adjusting nRF52 UART interrupt priorities
For wired split on nRF52, you may need to adjust the priority for UART
interrupts lower, to ensure the interrupts used for timing sensitive
BT operations can run when needed, so document this in our pinctrl docs.
refactor(split): Restore use of aync UART on nRF52.
With fixes for Zephyr UART driver, re-enable using async API on nRF52.
fix(split): Minor wired split fixes.
Various minor fixes for wired split to avoid spurious TX in half duplex,
etc.
fix: Unconditionally define HID payloads to avoid error.
Don't conditionally define HID indicator payload, to avoid compilation
errors.
docs(split): Expand on details of split transports.
Expand the split keyboard documentation with a more fleshed out section
on the available split trasnports, and what is and isn't supported by
each, including the runtime selection functionality.
---------
Co-authored-by: Nicolas Munnich <98408764+nmunnich@users.noreply.github.com>
* docs: Add secondary functions for the keypad number keys
* docs: Change descriptions of secondary functions for the keypad number keys
The descriptions were updated to match those of the USB HID usage tables.
* Reference combos by index, not 32-bit pointers, and store bitfields
instead of arrays in several places, to bring down our flash/RAM usage.
* Use bit field to track candidate combos, to avoid needing an explicit
`ZMK_COMBO_MAX_COMBOS_PER_KEY` setting.
* Determine the max keys per combo automatically from the devicetree,
so we remove the ZMK_COMBO_MAX_KEYS_PER_COMBO Kconfig symbol.
chore: Fix deprecated vscode Python formatter
The python.formatting.provider setting was deprecated in favor of
having a separate extension for each Python formatter and using
editor.defaultFormatter instead. This adds a recommendation for the
Black formatter extension and selects it for Python files.
chore: Limit vscode Python analysis paths
This limits vscode's Python analysis to the scripts folders so it
doesn't slow down trying to scan all of Zephyr.
Fix 8 bit truncation of 16 bit scroll values when passed into
functions `zmk_hid_mouse_scroll_set` and
`zmk_hid_mouse_scroll_update`.
Fixes: #2864
Co-authored-by: Tobias Adolph <43353209+adolto@users.noreply.github.comgit>
refactor(split): Refactor split code for extension
Extract central/peripheral code to allow for plugging in alternate
transports, instead of tying all split logic to BT.
feat(split): Add full-duplex wired split support
* Depends on full-duplex hardware UART for communication.
* Supports all existing central commands/peripheral events, including
sensors/inputs from peripherals.
* Only one wired split peripheral supported (for now)
* Relies on chosen `zmk,split-uart` referencing the UART device.
docs: Add wired split config docs.
Migrate split to its own dedicated config file, and add details
on wired split config.
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
fix: Properly override stack size on RP2040
Move the system work queue stack size override on RP2040 ouf of
a `ZMK_BLE` conditional so it is properly applied generally for that
SoC.
---------
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
feat(shields): Add tester_xiao layouts
Added two layouts for the XIAO tester shield:
- Keys arranged to match the XIAO pinout, viewed from the front
- Single row of eleven keys
These layouts are abstractions since the tester_xiao shield may be
used in a situation where the "keys" are actually jumper wires on a
breadboard or the like.
feat(shields): Add tester_pro_micro layouts
Added two layouts for the Pro Micro tester shield:
- Keys arranged to match the Pro Micro pinout, viewed from the front
- Single row of eighteen keys
fix(pointing): Temp layer threading protection.
Ensure all layer operations occur on the system work queue thread.
Fixes: #2719
fix(pointing): Handle layer events to disable events
Make the temp layer input processor propely handle layers getting
deactivated externally before the temp layer timeout.
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
test(behaviors): Add same position sticky key tests
fix(behaviors): Make multiple sticky keys work on same key position
refactor(behaviors): Remove unused param2 in sticky keys
refactor(behaviors): Add max-held tap-dance config
Add new `CONFIG_ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD` config for reducing RAM
usage on more constrained devices.
refactor(behaviors): Move defaults to Kconfig.defaults
docs: Inline simple physical layouts in new shield guide
docs: Fix broken anchor in module creation
docs: Make physical layout transform label consistent and comment
Zephyr is still working on the plan upstream for generically controlling
display "backlight" pins with GPIO/PWM, so in the meantime, add our
own chosen property `zmk,display-led` that is set to an LED device child
to allow blanking/unblanking of devices that use a dedicated backlight
control pin.
fix(display): Do LVGL task processing in main on POSIX.
An SDL/Zephyr bug prevents proper display when SDL calls are
made from anything but the main thread, so add task handling
in our simple main function when on POSIX.
fix(usb): Compilation fix for 64-bit targets
Properly handle differences in the size of `size_t` on 64-bit
architectures.
fix(display): Imply, but don't force, LVGL mono theme
Some targets may be using color displays, so instead of forcing
on the mono theme, merely imply it to default it
When building for ZMK Studio, we can use the constant stock keymap
for init of the in-memory keymap, to avoid duplicate flash usage
for the keymap from the devicetree.
To be able to save on flash space, for layouts on space constrained
devices that don't require rotation, make key rotation props
optional behind a new Kconfig flag.
Save a tiny bit of RAM by properly marking our device config
struct instances const consistently, and also add missing static
modifiers to properly isolate config/data for drivers.
docs: Move battery sensing hardware integration to new page
docs: Refactor lighting hardware integrations to new category
docs: Link to pin control page from lighting pages
docs: Consolidate lighting feature pages
docs: Remove incorrect redirect
docs: Consolidate lighting config pages
test(pointing): Add mock input device.
New mock input device to generate input events for tests.
test(split): Add peripheral input test.
Test event propagation from peripheral input devices.
fix(split): Proper scoping for local within switch.
Minor compile fix.
chore: Fix up test snapshots after logging changes.
Adjust the test snapshots after logging changes to the central.
fix(kscan): Don't fire last mock event twice.
Fix a bug where the kscan mock would raise the last mock event
twice before halting processing.
test(sensors): Add mock encoder sensor
Add a new mock sensor driver for generating mock encoder sensor channel
data.
test(split): Add a peripheral sensor split test
Test BLE split logic for peripheral sensors (encoders).
docs: Add missing code fence languages in pointing
docs: Fix default msc exponent in example
docs: Make pointing hardware integration follow semantic structure
When building a unibody or central warnings get thrown for the backslash newlines at EOF in combos.h and input_listeners.h. Adding a trailing newline to the affected files rectifies this
* Enhance the BLE test runner to build additional peripheral builds
when detecting peripheral*.overlay files in the test.
* Add basic and multiple-peripheral tests to exercise the testing
support
* Add test for triggering local behaviors on split peripherals.
fix(ble): Fix building split code w/o settings
* Properly exclude storing peripheral addresses to settings when
settings support isn't turned on.
refactor(pointing): Allow stopping event propagation
Allow input processors to return a special value if a given input event
should not be further processed/propagated.
feat(pointing): Add behavior input processor
Add the ability to intercept certain input events and trigger behaviors
when they occur.
Co-authored-by: Jorge Villalobos <minusfive@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
The "arg" field on nanopb structs is a void* because it is shared
between the encode and decode callbacks, even though the encode
callback probably should not modify the data. We are passing const data
using this non-const pointer, which causes warnings about discarding
const. This commit explicitly casts to void* to suppress these warnings.
* include kscan.yaml so we can set kscan-composite as a wakeup source
* modify enable and disable callback to check for wakeup capabilities of
composite and children
* disable children wakeup source
The disable function is only called
when the composite is not an enabled wakeup source.
In that case the children should also not be an enabled
wakeup source, so they can get suspended
* Set default revision to 5.20
* update mikoto board defs
* add revision info to mikoto.zmk.yml
* use zephyr aliases to handle mikoto_520
* enable pull-ups for on-board i2c
docs: Fix incorrect kconfig default values
fix(Kconfig): Added a name to EC11's trigger mode choice, allowing it to be set in device Kconfig.defconfig
refactor(Kconfig): Moved designer defaults out into new files
Add a separate ignore script that checks git changes but also
only deploys main and version branches to allow us to deploy
versioned docs.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Add VERSION file that Zephyr will pick up
* Add release-please automation
* Updated docs on commits messages, and PR process
* Updated PR template to match.
---
Release-As: 0.1.0
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Add support for initializing a pin to a given high/low value during
configuration. Needed for proper initialization by systems like
GPIO hogs or gpio-leds Zephyr drivers.
Renamed the composite kscan's column-offset property to col-offset for
consistency with other properties such as matrix transform's col-offset
and matrix kscan's col-gpios.
Added physical layouts for the following variants of numpads:
- With and without extra top row
- 2U plus key or 1U plus and backspace keys
- 2U 0 key or 1U 0 and 00 keys
- Full 1U grid/macropad layout
Other layouts exist, such as "southpaw" horizontally mirrored layouts,
and layouts with a fifth column, but those seem to be much less common.
* docs(feat): Provide example of PIO SPI for RGB underglow
* docs(feat): further generalize RGB information
* docs: use nice_nano_v2 for board-specific shield config example
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* docs(feat): Adding some additional clarity around low power states, with guide portion moved to hardware integration
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* docs: Split local toolchain setup for Docker in two separated approaches.
This includes adding a new dropdown for Docker which lists overall steps
that have to be done when setting up the environment. Furthermore, the
previous documentation is no listed under VSCode and new documentation
for the Devcontainer CLI has been added.
Since the described approaches for VS Code and Dev Container CLI varied
quiet a bit a more unified way of setting them up was added. Due to
that, the documentation for building and flashing could be simplified as
well.
* docs: Update documentation for building and flashing for devcontainers.
Moved information about creating volumes for Docker containers into the
overall Docker setup documentation. Add warning for changing build
directory or adding options for building at the top of the page.
* feat(devcontainers): Add new volume for mounting modules.
---------
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
* docs(feat): Added a page on pin control for ZMK
* Added note on HAL modules
* docs: Added images of boards
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* fix(docs): Fix TypeScript import diagnostics
Set the TypeScript module resolution mode to "bundler" so it correctly
resolves imports in .ts files instead of showing errors in IDEs.
* chore(docs): Update web-tree-sitter
Updated web-tree-sitter, and switched from having a copy of
tree-sitter-devicetree.wasm in the repo to using the latest version of
the tree-sitter-devicetree module, which now contains the .wasm file.
* fix(docs): Make keymap upgrader resize vertically only
Changed the textarea in the keymap ugprader to allow only vertical
resizing. This better fits the layout of the page, and it prevents you
from shrinking the box horizontally to the point where it doesn't fit
anything.
* To avoid tons of migration, extra flash writes, etc, we keep
the keymaps and settings using a key position index that's tied
to the stock layout, and at runtime mapping key positions as
needed.
* Added matrix transforms and physical layouts for three typical
configurations.
* Tweaked default keymap to be more immediately useful for ZMK and more
closely resemble the default keymaps of non-ZMK firmware.
* Board-specific Kconfig settings migrated to main shield file, so they
will be exposed to end-users through the setup script.
* Tidied formatting and shortened overlong layer labels.
* Aligned encoder configuration with current standards.
* Corrected default number of RGB LEDs.
* Enabled OLED by default in a less authoritarian way.
Add physical layouts and update the keymap for Ladniy's Jiran.
Layouts are added for all three possible transforms:
- Full (with additional pinky key and number row)
- Jian (with additional pinky key), re-uses Jian layout
- 6 column (Corne), re-uses Jian layout
Keymap update includes &studio_unlock.
Add physical layouts and update the keymap for King of Hedgehogs' Jian.
Layouts are added for all three possible transforms:
- Full (with additional pinky key)
- 6 column (Corne)
- 5 column (Minidox)
The layouts are added to be re-usable for the Jiran and other custom boards/shields.
Keymap update includes, small guide clarifications, output selection,
tri-layer and &studio_unlock.
Add physical layouts and update the keymap for Joric's Jorne.
Layouts are added for all three possible transforms:
- Full (with additional pinky key)
- 6 column (Corne), re-uses Corne layout
- 5 column (Minidox), re-uses Corne layout
Keymap update includes quick-tap-ms (essential for this keymap), small
guide clarifications, output selection, tri-layer and &studio_unlock.
* Add tracking to see if we ever hit a configured status before
suspend, so we can properly track "is connected" even when
connected to a suspended/asleep host.
* docs: Added layout configuration reference page
* docs: Refactored and revamped physical layout creation information
* docs: Added note in studio features page
* docs: added studio_unlock note in features section
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Joel Spadin <joelspadin@gmail.com>
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
* Now that device init of kscan sideband is in POST_KERNEL stage,
use a separate SYS_INIT for auto enabling the device so processing
of early/initial presses from referenced toggle mode kscan devices
occurs at the proper time during init.
* More fine grained status reporting when saving changes. Needed to we
can notify the client if we've got errors saving settings due to
running out of space, etc.
* Return the max layer name lenght in the keymap payload, for the UI to
leverage.
Removed the combined .dtsi file for each group of common layouts, and
split the position map across the files in each group. This makes
reading the position maps slightly more difficult, but it aligns the
common layouts with the keyboard-specific ones such as
foostan/corne.dtsi in that simply including each header adds the
layout, with no need to set status = "okay".
This allows for the device name to be set at runtime, possible uses for this include a custom display screen that lets you type it in using the keycode state event, future configuration in zmk studio, or altering it per profile as per #1169
* If using a sideband kscan device to wrap a native kscan device,
ensure the inner kscan device is also wakeup enabled to it can
be waken from a deep sleep state by key press.
* Document setting up studio for a new keyboard definition.
* Document how to enable ZMK Studio for a build, adding reserved layers,
and controlling which behaviors are built into a studio firmware.
* Document `&studio_unlock` behavior.
* Document studio configuration options.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Add Corne and Ferris shared layouts, and update the respective
shields to use them.
* Add a sample Hummingbird physical layout for testing posix xiao.
* Add Sofle physical layout as an additional reference.
* Make it easier to test native builds of our shields by adding
`posix_pro_micro` and `posix_seeed_xiao` so you can build posix
target of, e.g. `corne_left` for testing ZMK Studio.
* Use defines to keep either all behaviors with omits, or selective behaviors with
explicit kept behavior, before including `behavior.dtsi` in keymaps.
* Default ZMK_BEHAVIORS_KEEP_ALL when building with the studio RPC
endpoint snippet.
* Add keymap API for getting/setting a bindings
in keymap layers.
* Add layer move support via intemediary ordering array.
* Add settings storage for keymap changes.
Increase buffer size used for placing LVGL symbols on displays. This
prevents array overflow warnings as discussed in #2444.
Also convert one sprintf to snprintf to ensure the buffers are always
null terminated and never overflow.
Signed-off-by: Mike Szczys <szczys@hotmail.com>
* UART and BLE/GATT transports for a protobuf encoded RPC
request/response protocol.
* Custom framing protocol is used to frame a give message.
* Requests/responses are divided into major "subsystems" which
handle requests and create response messages.
* Notification support, including mapping local events to RPC
notifications by a given subsystem.
* Meta responses for "no response" and "unlock needed".
* Initial basic lock state support in a new core section, and allow specifying
if a given RPC callback requires unlocked state or not.
* Add behavior subsystem with full metadata support and examples of
using callback to serialize a repeated field without extra stack space needed.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Studio will use stable layer IDs to refer to layers, so that
layer reordering doesn't affect behavior bindings, so update to match.
* Fix a few layer metadata entries that missed being refactored.
* Because settings load is delayed now, enable external
power on init, and let it be disabled on settings load
later, to ensure power is on early for
other peripheral initialization.
Fixes: #2361
* Add bindings to allow creating multiple physical layouts that specify
their key's physical attributes, and the matching matrix transform
and dependant kscan to use.
* Synthesize a basic physical layout if none specified, for backwards
compatibility.
* Update matrix transform API to explicitly pass in the selected transform
to the API instead of using a fixed chosen transform.
* Move kscan subscription and handling into the physical layout code, so
that selecting a different physical layout at runtime can also use the
correct kscan instance.
* Add `physical_layouts.dtsi` file to include so you can use the
pre-configured `&key_physical_attrs` for adding you layout keys.
* Avoid doing duplicate calls to setings_load_subtree, which iterates
NVS fully each time under the hood, and instead use on settings_load
later in the lifecycle.
* Add a new feature for tracking a given behavior by a new concept
of a "behavior local ID" which is a stable 16-bit identifier for
a given behavior, that is resilient to new behaviors being added
and requires no additional work on the part of the behavior
authors.
* Add implementations for either settings lookup table, or CRC16
hashing of behavior device names for generating behavior local
IDs.
This adds a new config value `ZMK_HID_SEPARATE_MOD_RELEASE_REPORT`
where, if enabled, the report for a key release is sent separately to
the accompanying modifier release signals, which are then sent in a
second report.
This fixes an issue where certain applications are unable to work with
implicitly modified keys (e.g. colon) due to them registering the
modifier release prior to the actual key release.
Have tested this on my personal keyboard and `wev` now shows the signals
in the correct order.
=> **Previously:** ```LSHIFT (pressed) -> colon (pressed) -> LSHIFT
(released) -> **semi**colon (released)```
=> **Now:** ```LSHIFT (pressed) -> colon (pressed) -> colon (released)
-> LSHIFT (released)```
(This time without accidental files)
* For upcoming ZMK studio work, make a set of rich metadata available
to provide a friendly name for a behavior, and allow super flexible
descriptions of the parameters the behaviors take.
* Add ability to validate a zmk_behavior_binding against
the behavior metadata available.
* To avoid spurious CDC ACM instances when usint CDC ACM for something
other than logging, move to the approach used by Zephyr of using a
snippet to redirect console output to a CDC ACM node added by the
snippet. Remove all the existing static CDC ACM nodes.
* Add new `zmk-usb-logging` snippet that mirrors the upstream
`cdc-acm-logging` snippet, but still does our extra USB logging
configuration.
* Updated logging docs accordingly.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
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>
Added a Kconfig option to enable SOC_DCDC_NRF52X_HV for nice_nano_v2
and mikoto. According to Nordic's documentation, the DC/DC regulator is
more efficient than the LDO regulator, so this is enabled by default.
The following boards do not support this mode and were not changed:
- nice_nano
- nice60
- nrfmicro_11, nrfmicro_13
- nrf52840_m2
- bluemicro840
I could not find schematics to confirm whether the following boards
support this mode:
- bt60_v1, bt60_v2
- bt65_v1
- bt75_v1
- corneish_zen_v1, corneish_zen_v2
- pillbug
- puchi_ble_v1
- s40nc
The devicetree pulls always add on to the extra pulls configured by toggle mode, so these should not have pulls defined in the devicetree. Saved ~200uA avg on another board with a 3t toggle switch
* In order to be sure the rest of the system is fully ready before
intializing, because init may result in immediate events being
triggered when used with toggle direct kscan inner devices.
* Use the correct property for extra GPIOs to
make active for the waker before going into soft
off state.
* Change header depth for easier navigation of the
soft off feature page.
Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com>
* Add dedicated init priority for the sideband kscan.
* Refactor sideband code for clarity.
* Tweaks to direct kscan for clarity.
* Make sideband behavior row optional for brevity.
* Allow overriding ZMK Uno sideband behaviors.
* Instead of gpio key behavior trigger, add new kscan driver that
decorates/wraps a given kscan driver and will invoke basic system
behavior assigned to a given row + column, without the need for keymap
mapping in the matrix transform, bypassing keymaps entirely.
* Better naming for gpio-key behavior triggers.
* Tweaks to scanned behavior trigger to avoid bad semaphore use,
and reduce chance of issues with slowly scanned matrixes.
* Various code cleanups of style issues.
* Move to explicit enable of `ZMK_PM_SOFT_OFF` to turn
on the feature and use the behaviors, which matches
how other features work, and helps with split and
testing schemes.
Initial work on a soft on/off support for ZMK. Triggering soft off
puts the device into deep sleep with only a specific GPIO pin
configured to wake the device, avoiding waking from other key
presses in the matrix like the normal deep sleep.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* To be able to use the Zephyr `voltage-divider` driver,
add a mode for fetching raw voltage from the sensor
and do state of charge calculation outside of the driver.
* Add a dedicated settings reset on start init priority and default
it to lower priority (high number) than default FLASH_INIT_PRIORITY
to be sure flash is initialized before we open the area.
Updated the section for troubleshooting split halves unable to pair now
that the settings_reset shield resets all settings and explicitly
disables CONFIG_ZMK_BLE:
- Added a note that all settings will be reset.
- Removed the section about immediately putting the halves into
bootloader mode to prevent pairing, as this is not necessary anymore.
- Added a note that you will not be able to see or pair the Bluetooth
keyboard until you have flashed regular firmware again.
- Added a sentence to clarify that you will need to re-pair the
keyboard to all host devices.
Also added some text describing common scenarios where this procedure
might be needed.
Added a new CONFIG_ZMK_SETTINGS_RESET_ON_START option which enables init
code to call zmk_settings_erase(), and changed the settings_reset shield
to use it instead of CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START, so it now
resets all settings instead of just clearing BLE bonds.
CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START is left in place for now in case
someone still needs it. It may be replaced in the future once we find a
better way to repair a broken split connection.
Added a zmk_settings_erase() function to clear all saved settings. This
does not go through Zephyr's settings subsystem, but instead directly
clears the data from the setting storage backend, so a reboot is needed
for it to take effect.
* Handle board keymap location for boards with Zephyr
board revisions included.
* Includes bare non-revision file and a revision specific keymap
in case newer revision changes the layout/key positions.
Added a warning to the shield section explaining that Kconfig does
not ignore whitespaces on function calls and therefore adding whitespaces
after the comma will break functionality.
* Don't default heap mempool by default now that there's a dedicated
LVGL mempool
* Set proper defaults for CiZ display hardware/custom screen.
* Double the dedicated display thread stack size for CiZ.
Added an upgrade function to the keymap upgrader to replace the encoder
"resolution" property with "steps" and (if it is not already present)
"triggers-per-rotation".
Fixed an issue where a text edit at the very end of a file would cause
it to highlight from the start of the edit to the start of the file
instead of to the end of the file.
Added an upgrade function to fix renamed behavior nodes in the unlikely
event that someone was changing behavior settings this way instead of
using references.
Changed the key code upgrader to only replace codes that appear in
"bindings" properties. Modifier flags such as MOD_LCTL are no longer
valid as key codes, but they are still used in "mods" properties and
should not be replaced there.
Updated the keymap upgrader to highlight which lines it changed as well
as indicate when nothing needed to be upgraded.
Also adjusted the line highlight colors to be more readable in both
light and dark color schemes.
Moved the keymap upgrader to a top-level page like the power profiler
to make it more discoverable. It upgrades more things than key codes
now, so putting it in the codes category doesn't make much sense.
Converted the upgrader code to TypeScript and split it up into smaller
files to make it easier to add new upgrade functions.
Added upgrade functions to remove/replace "label" properties and rename
matrix-transform.h to matrix_transform.h.
* While functionally equivalent, the hyphenated form of this property
is more consistent with other ZMK properties and adheres to DTS style
guidelines.
* Additionally, update links to use Zephyr 3.2 documentation instead
of 2.5 where appropriate.
Remove unused components, and disable proptype checking for children
in OsTabs custom component since I can't figure out a way to assign
propTypes to it in an mdx file.
eslint-plugin-react is emitting a lot of react/no-unescaped-entities
errors in mdx files, primarily due to apostrophes. It seems not ideal
to have to escape every apostrophe in all mdx text, so this commit
disables the check.
There might be a better way to handle this issue, but I am not aware
of one right now.
* Move to local/stack allocated event API that doesn't require
dynamic allocation/freeing.
* Disable heap, we no longer use alloc/free unless using LVGL.
* Tons of refactors all over to account for the new event approach.
zmk_battery_start_reporting() may be called from battery_event_listener(), which
will result in a bus fault when attempting to read a battery that does not exist
such as on a dongle.
* If attempting to notify and getting an EPERM return value, request
upgrading the security of the connection at that moment, since it
likely means we got a connection to a bonded host but the connection
hasn't been upgraded to encrypted yet.
* Add security related tests to verify behavior when trying to read
a GATT characteristic from our peripheral with and without client
auto security request/retry.
* Auto security request actually makes macOS worse, so disable it,
and remove our early request in favor of using GATT enforcement
to ensure connections are secured.
Note there was one place where a non-strict prototype was actually being used
with an argument, in `zmk_hog_init`. In this case, the actual argument type was
added instead.
* Add ability to fetch and report peripheral battery levels
on split centrals.
* Add additional support for adding a new Battery Level
service to split centrals that exposes fetched peripheral
battery levels to connected hosts.
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
* Among other issues, this message is often misinterpreted by users
building out-of-tree shields -- leading them to think the shield
"not being found" is the cause of a build failure.
* Add a new Kconfig symbol to enable the low priority queue, and make
the two features that depend on it `select` the symbol to turn it on.
This helps ensure no wasted RAM/ROM on devices that don't need it.
* Split connection and security experimental changes into dedicated
Kconfig flags for easier testing of only connection related fixes.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Update the new shield guide to position Zephyr module location
as the default when creating new shields, with a note about
using ZMK repository itself as a last resort.
* Document building with additional Zephyr modules.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Detect in our build script if our config repo is *also* a Zephyr
module and if so pass to ZMK build in ZMK_EXTRA_MODULES
define.
* Copy config directory contents to new independent temp workspace
to avoid Kconfig conflicts between the build repo's zephyr module
directory and the checkout zephyr pulled in by `west update`.
* Shift to using an extra Zephyr module to do keymap location
work after all board roots are resolved. This avoids duplicate work
and allows us to load custom boards from Zephyr modules as well as
user config setups.
Added a section to the new behavior guide to document that the names of
behaviors invoked on the peripheral side of a split must be at most 8
characters long.
Removed the label property from built-in behaviors, custom behaviors
defined in a few keymaps, and macros generated with ZMK_MACRO().
Now that node names are used to identify behaviors, and names only need
to be unique within the set of behaviors, the names of all behaviors
have been shortened to be similar to their original labels.
This means that any keymaps which reference behavior nodes by name
instead of by label will need to be updated. Keymaps typically use the
labels though, so most keymaps should be unaffected by this change.
Added BEHAVIOR_DT_DEFINE() and BEHAVIOR_DT_INST_DEFINE(), which work
exactly like the DEVICE_*_DEFINE() macros, except they also register the
device as a behavior by adding a pointer to it to a memory section.
Added zmk_behavior_get_binding(), which works like device_get_binding()
except that it only searches the devices that have been registered as
behaviors. This ensures that behaviors cannot have name collisions with
other devices defined by the SoC, which will be important when we remove
the label property from behaviors so they are given their node names.
As an added benefit, this is faster since it searches a smaller list.
Some basic benchmark code I wrote indicates it takes 30-70% as long,
depending on where the behavior is in the list and whether the name
string is an exact pointer match.
From now on, behaviors should use BEHAVIOR_*_DEFINe() instead of
DEVICE_*_DEFINE(), and any code that looks up a behavior by name should
use zmk_behavior_get_binding() instead of device_get_binding().
Changed the property used to define a layer name for displays from
"label" (which affects other things in Zephyr and is deprecated) to
"display-name". (It cannot be named simply "name", because that has
special meaning in newer versions of the devicetree compiler.)
"label" is still supported as a fallback, so no changes need to be made
to existing keymaps.
Removed "label" properties which no longer have any function.
Labels are still used as layer names and as identifiers for sending
behaviors between sides of a split keyboard, so those have been left
alone for now.
Changed the label property on zmk,ext-power-generic to be optional and
removed it from existing uses. Renamed the nodes for all non-development
boards to "EXT_POWER" to preserve user settings.
rgb_underglow.c now finds the correct device by finding the first
instance of zmk,ext-power-generic instead of looking for a node named
"EXT_POWER".
Changed all code (except for layer names) which used the label property
to use DEVICE_DT_NAME() instead, which uses the label if set or falls
back to the full node name. This matches how Zephyr determines the node
names used with device_get_binding() and allows us to start removing the
deprecated label property from things.
There is already a function to see if the peripheral is connected, a matching one for if it's bonded is a useful addition for displays/indicators. `is_bonded` gets reset to false in the advertising function in preparation for runtime peripheral bond clearing
By default the maximum NKRO usage is set to maximise compatibility, but some keys dont work, this adds the ability to use those extended keys, at the cost of compatibiltity
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Don't propogate any key press events while in the
middle of passkey entry, avoid funky state on hosts.
* Handle passkey on release, not press, to ensure key *releases*
are not accidentally sent, especially the Enter release
at the very end of passkey entry, which can trigger
cancel in the dialog if the keyboard is connected
via USB to the same host.
* Properly handle the user enabling the
`CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE`
Zephyr flag and handle re-pairing to an existing taken
profile from the same address.
Currently this is only documented in the zephyr 3.0 upgrade blog. This explicitly documents it as well as when it doesn't need to be applied (i.e. when a mcu board is already in use).
Adds new functionality and a behavior to disconnect an active BLE connection.
The motivation for this is that for some devices like phones, the presence of an
active BLE connection results in the onscreen keyboard being selected.
* Add HID report/descriptor for a new report with mouse buttons,
and x/y/wheel deltas.
* New mouse key press behavior for press/release of mouse keys.
* Add constants for HID main item values (e.g. data/array/absolute)
* Define and use constants for our HID report IDs.
The battery reporting has been known to cause macOS computers to wakeup repeatedly. In some cases (e.g. display or custom lighting implementation) one might want to collect battery SOC without broadcasting over BLE
* Update docs/docs/config/battery.md
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Previous version of multiple overrides of the default value of ZMK_USB
were problematic. Move to using board _defconfig files for the
defaults for those, along with proper `depends on` for ZMK_USB that
accounts for split and split roles.
* USB boot protocol support
* Use a single definition of a boot report, used for regular reports in
non-6KRO, and for rollover in all branches.
* Handle gaps in the zmk report when producing a boot report in HKRO mode. For
.example, if it was 8KRO, it would be possible to have the state 0 0 0 0 0 0 0
17 (by pressing 8 keys, and letting go of the first 7). Copying the first 6
bytes would not show up the single pressed key.
* Disable usb status change and callback on SOF events:
SOF events were introduced by the boot protocol changes, and required internally
by Zephyr's idle support, but are unused within ZMK itself. Ignore them in the
usb status callback.
---------
Co-authored-by: Andrew Childs <lorne@cons.org.nz>
* Update new shield guide for new sensor/encoder settings.
* Add DTS section to encoder config docs.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
`CONFIG_ZMK_BATTERY_REPORTING` is currently undocumented, A new KConfig section for battery has been added in line with the other sections in the configuration section of the docs, `CONFIG_ZMK_BATTERY_REPORT_INTERVAL` has been moved from system to battery for consistency
* Initial implementation of REVIUNG34 shield.
* Add copyright information to files
* Added a README with instructions on how to enable the 1x2u layout.
* Add a default chosen matrix transform in the default keymap, alongside a commented out version for the alternate layout.
---------
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Added syntax highlighting for devicetree and kconfig files.
The PrismJS project is not accepting contributions right now as they
work on a version 2 of the library, so the new language files are added
directly here.
Also enabled syntax highlighting for various languages that are used in
the docs but aren't enabled in Docusaurus by default.
Fixed an error in a previous commit where a member of the selected
endpoint was used without checking if it was the correct transport type.
The nice!view status screen displays the active BLE profile regardless
of whether BLE is active, so we have to get that data directly from the
BLE code instead of from the selected endpoint.
* Refactor common parts of the Microdox sheild into a separate file. This is in preparation for adding Microdox V2 as another shield in the same directory.
* Refactor Microdox keymap into a common file in preparation for Microdox V2
* Add Microdox V2 shield definition
* Added a README to explain v1/v2 differences.
This brings the 'global-quick-tap' functionality to combos by filtering
out candidate combos that fell within their own quick tap term.
I also replaced `return 0` with `return ZMK_EV_EVENT_BUBBLE` where appropriate.
(I assume this was done in past as it is similar to errno returning, but
being that this is to signify an event type I find this more clear)
Detaching the global-quick-tap functionality from the quick-tap term.
This makes way for two improvements:
1. This functionality can be added to combos under a unified name
'global-quick-tap-ms'.
2. This allows users to set a lower term for the 'global-quick-tap'
(typically ~100ms), and a higher term for the regular
quick-tap (typically ~200ms)
This deprecates the global-quick-tap option, however if it is set, the
quick-tap-ms value will be copied to global-quick-tap-ms.
Changed the endpoints code to rename the existing endpoint types to
"transport" and add the concept of "endpoint instances". A transport is
the method by which data is sent, while instances allow describing
multiple endpoints that use the same transport (e.g. bluetooth profiles)
Also added new APIs to get the total number of possible endpoint
instances and assign each instance a unique index, which can be used
for tracking separate state for each endpoint in other code files.
* Promote previously local debounce code from kscan drivers to exposed
module lib, for use with other drivers as needed.
* Refactor existing kscan driver to new "public" API.
The GD25Q16 flash connected via QSPI seems to be causing issues
with excessive battery use and inability to sleep. Since ZMK doesn't
use it, disable it.
Resolves#1901
* Split centrals to scan with their identity so they receive direct
advertising packets.
* Split peripherals to use direct advertising if they have an existing
bond to a split central.
Bluetooth bindings are useful for handling pairings with hosts. This
change adds the header and a few default commands as template for
new users to work with.
This commit adds a new GATT characteristics on the peripheral side
and wires it up to read sensor values. The central side subscribes
to this new characteristics and replays sensor values on its side.
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Quite a few people have struggled with setting the correct
`chain-length` for their `led_strip`. For some, this is their first time
needing to change a pre-defined devicetree property, and so they aren't
familiar with the technique. I commonly see folks adding a duplicate of
the entire `*.overlay` file with only the `chain-length` value changed.
Having clear documentation for this specific application of the property
override technique could help forestall these problems, and give those
of us helping out in Discord something to easily reference.
With ADC pin, maximum 3.6V input needs gain 1/6 to be less than the 0.6V
reference.
With VDDHDIV5, maximum 6V input corresponds to 1.2V so gain 1/2 will be less
than the 0.6V reference and be slightly more precise.
* Add new shield for splitkb.com Aurora Sofle, supporting
keys, encoder(s), displays, and RGB.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Proper usage of bt_uuid_cmp.
* Central's don't start scanning for peripherals if
`ZMK_BLE_CLEAR_BONDS_ON_START` is enabled.
* Split peripherals don't advertize if
`ZMK_BLE_CLEAR_BONDS_ON_START` is enabled.
* Add Leeloo v2
* Leeloo-Micro v1 updates to support Zephyr 3.2
* Refactored for new Encoder Configuration
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Add two new compatibles for macros that
take one or two parameters when bound in
a keymap.
* Use `¯o_param_1to1`, `¯o_param_1to2`, `¯o_param_2to1`,
and `¯o_param_2to2` control entries in the bindings for the macro
to have the next binding entry have it's values substituted.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Add new `steps` property to the `aips,ec11` binding, to make
the driver properly report degrees in the rotation delta channel.
* Handle old sensor values in sensor rotate behavior.
* Refactor sensor events to include channel data,
necessary for prop split encoders, and avoiding duplicate calls,
to fetch channel data twice, etc.
* More consistent behavior driver API.
* Allow setting triggers per resolution at the behavior level optionally.
* Capture the last 6 entered digits, and then require pressing
Enter/Return to submit the entered digits. This matches the
messaging shown on hosts regarding how to complete pairing.
* Fix the wording on the Kconfig menu item to accurately describe
the feature.
Changed the GPIO matrix and direct GPIO key scan drivers to do a single
read per port instead of one read per pin. This is much more efficient
for some types of GPIO drivers, such as I2C GPIO expanders.
To accomplish this with minimal overhead, we now sort input pins by port
at driver init. if we iterate through the pins in the sorted order, all
pins on the same port are consecutive, so we only need to read each port
once the first time we see it.
Add CONFIG_ZMK_DISPLAY_INVERT Kconfig to invert colors
(black-on-white to white-on-black) on monochrome screens.
Currently applies only if CONFIG_LV_USE_THEME_MONO is selected,
which is the default unless user overrides it.
All displays currently used with ZMK are monochrome so it makes sense
to enable the mono theme by default, which can be disabled by the user
since we use the "imply" statement.
Without this theme setting, the small font size selection for widgets
at the bottom of the stock status screen does not work.
Updated web-tree-sitter and the devicetree grammar.
web-tree-sitter now supports a custom function to locate its .wasm file,
so performing a string replace is no longer necessary to get it to work
with Docusaurus' Webpack configuration. We now check when tree-sitter is
locating its .wasm file and provide the Webpack-adjusted URL.
Microsoft's C/C++ extension performs poorly on some systems, so this gives the option to use any other extension that supports formatting with clang-format.
Added settings to format various file types on save in VS Code.
Added some recommended VS Code extensions:
- Prettier for formatting various file types
- Python for formatting Python files
- C/C++ for formatting C files
- Devicetree for syntax highlighting
- CMake for syntax highlighting
Adds support for the CKP family of boards
BT60V2 ANSIHotswap, ISO Hotswap, ANSI Lowpro and soldered
BT65 ANSI Hotswap, ISO Hotswap and soldered
BT75 ANSI Hotswap and soldered
The BT65 and BT75 are stylised as btXX_v1 in order to maintain compatibility with customers existing zmk-config setups in the same way the BT60 V1 was handled when merged into main.
CKP boards have identical pinmapping between hotswap and soldered so there's only one set of defconfig, dts, keymap, yaml and yml files per size
* Reports of constant/frequent disconnects, with HCI err 0x28,
"instant passed", seem linked to newer LLCP that became default
in Zephyr 3.2, so revert to the Legacy LLCP for now until a
proper fix for new LLCP can be found.
Added a workaround to select the latest version of Prettier with
pre-commit, since the pre-commit mirror repo started tracking alpha
releases and doesn't have anything beyond 2.7.1.
Updated existing pre-commit hooks and added some new hooks:
- Remove trailing whitespace
- Ensure every non-empty file ends with a new line
- Check YAML file validity
- Prevent adding large files
- Ensure any scripts with shebangs are executable
Added a GitHub action to run pre-commit on every commit. Removed any
existing actions which duplicate pre-commit.
Ran pre-commit on the codebase.
* Add new sensor behaviors that either take full bindings
add definition, or accept parameters when bound in the
keymap.
* Remove existing hard-coded key press sensor behavior
and instead leverage new generic sensor behaviors to
achieve the same functionality.
Co-authored-by: nick@conway.dev
Extended the virtual key position system from combos so that each sensor
also gets a virtual key position. This allows sensor behaviors to use
the behavior queue API.
* Clarify the potential need of adding the ignore-modifiers setting for new sticky key behaviors.
* Add ignore-modifiers setting to skq example
* Update docs/docs/behaviors/sticky-key.md
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Before this change, if a matrix position was not present in the transform,
various incorrect behaviors would happen:
1) In some cases out-of-bounds accesses:
Note that the size of the`transform[]` array does not necessarily match
the size of the matrix. So for example if key position
(ZMK_MATRIX_COLS-1, ZMK_MATRIX_ROWS-1) is not present in the transform,
but ends up being pressed, then the array will be accessed beyond its
size, and any data could be returned.
2) In other cases the 0th position in the keymap will be used because
the `transform[]` array is initialized to all zeros.
Fixed an issue where the sticky key behavior would call
ZMK_EVENT_RAISE_AFTER(), which would free the provided event, but then
it would keep using that now-freed event data.
When enabling our high level USB logging, disable the USB driver
logging itself entirely, to avoid logging in the driver causing
errors when USB isn't up yet to send the logs.
* Move away from DT_LABEL.
* Move to DEVICE_DT_GET for non-behavior device access.
* Move various drivers to `gpio_spec_dt` and `DT` related macros.
* Remove mcp23017 while at it, since better upstream driver is
available.
* LV_ prefix from new LVGL official Kconfig now used.
* API changes for themes, container object removal, etc.
* Add our own Kconfig and code for theme default small font.
* Remove some hardcoded sizes.
The default configuration for corneish-zen enables a USB CDC endpoint by
default. This is most probably a debugging left-over. Disable that
endpoint. CONFIG_ZMK_USB_LOGGING depends on it anyway, so it will be
enabled again with that config option set.
- Asterisk in layer 1 was mapped to 8
- Underscore in layer 1 was mapped to minus
- Right GUI in layer 0 was mapped to right Alt
- Space in layer 1 was mapped to Return
- Plus was mapped with KP_PLUS
Renamed the "Basic Setup" page to "Toolchain Setup" to make it clearer
that this is for setting up a development environment for local builds.
Linked to the relevant Zephyr setup documentation instead of duplicating
that information in our guide. This also switches Windows and macOS
setup to using the Zephyr SDK, which is much easier to install.
Updated the command for installing Zephyr's Python dependencies to be
OS specific, as Windows and macOS don't need the --user flag.
Updated the IDE integration page with instructions for determining the
compiler path that work with the latest version of the Zephyr SDK.
* Add to metadata schema for interconnects.
* New conventional location for pinout diagrams/pics.
* New component to generate the tabs for the new shield
doc section on interconnects.
* Add XIAO and arduino uno pinout diagram.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Added ZMK_MACRO_DEFAULT_WAIT_MS and ZMK_MACRO_DEFAULT_TAP_MS to set
global defaults for the wait-ms and tap-ms properties of macros.
Also reduced the default timings for macros, since it's been reported
many times that 100 ms is too slow.
* Add blackbill interconnect metadata.
* Add config/overlay for upstream blackpill boards to work with ZMK.
* Add pillbug board.
* Updated new shield docs.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Added overlays to support building for the nRF5340 development kit.
Also added some documentation on how to build and flash ZMK for dual-
chip Bluetooth configurations, with an example for the nRF5340.
* Update docs for mod-morph
* Add unit tests for mod-morph
* Add keep-mods to DT binding
Co-authored-by: Martin Aumüller <aumuell@reserv.at>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Update planck_rev6.keymap
Third layer was causing problems so i moved reset and bootloader to second layer
* BT_sel functions
A customer requested this so we added it
* Update crbn.keymap
Co-authored-by: Nick Winans <nick@winans.codes>
The bindings for the toggle-layer-on-tap/momentary-layer-on-hold example code were backwards, resulting in toggle-on-hold. This also made momentary unachievable.
All credit for this one goes to @xudongzheng (thanks for helping debug
this!). Should fix the issue where keyboards go unresponsive after their
host machine wakes from sleep due to the USB driver entering an error
state. I was able to both reliably reproduce the issue before the patch
goes in and confirmed it no longer occurs post patch.
The `USB_DC_RESUME` state indicates the host event has resumed the connection.
Adding it to the list of valid connection states to prevent the error
when waking from sleep.
Zephyr API Link:
https://docs.zephyrproject.org/apidoc/latest/group____usb__device__controller__api.html#gac09e3e0af1a2b41a5bfbad91f900baf7fixes#1372
* This is a very simple fix to a rather complicated issue. Essentially,
hold-taps will "release" (raise) their captured keys before actually
telling the event manager they have captured a key. This means the event
manager ends up assigning the `last_listener_index` to the hold-tap
subscription rather than the combo. So when the combo calls
`ZMK_EVENT_RELEASE` it raises after the hold-tap instead of after the
combo as the combo code expects.
* The corresponding test (which fails without this change) has also been added.
* An event can be captured and released in the same event handler, before
the last_listener_index would have been updated. This causes some handlers
to be triggered multiple times.
* The solution is to update the last_listener_index before calling the next
event handler, so capturing and releasing within an event handler is harmless.
* Also see discussion at https://github.com/zmkfirmware/zmk/pull/1401
* If our handler dedides our undedided hold-tap,
return early before continuing.
* Fix incorrect pointer logic, resulting in combo
candidate filtering leaving incorrect timeout details.
Co-authored-by: Andrew Rae <ajrae.nv@gmail.com>
Co-authored-by: okke <okke@formsma.nl>
Add optional Kconfig setting to delay scanning after each
output column is set, and inputs are read, to allow inputs
to "settle" after the last column is set back to inactive.
Moved battery configuration to its own page to match the feature page.
Documented that external power is disabled when in sleep mode.
Clarified that the *_START configs apply on first boot, and any changes
after that are persisted.
Two new options for functionality to enable/disable RGB for
USB status or idle events.
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: ReFil <harryherring@gmail.com>
* Proporly handle multiple conditonal layers w/ the same target
`then-layer` values.
* Move handling to work callback, to avoid re-entrance for cascading
layers enabling other layers.
* Move to ZephyrBuildConfig package based on Zephyr best practices.
* Support multiple shields properly, e.g. -DSHIELD="foo bar", which
allows using existing upstream shields like `ssd1306_128x64` along
with another ZMK shield.
* Properly *add* the "ZMK config" .conf file to the conf file list,
so that existing board .conf files in `app/boards/<board>.conf` are
properly honored still. Needed for overrides to usptream boards when
combined with a local `<shield>.conf` file.
Previously, a trailing slash would be appended to all URLs when accessed
directly, but not when accessed via menus and links.
This Docusaurus configuration option keeps the URLs consistent by never
appending a trailing slash.
https://docusaurus.io/docs/api/docusaurus-config#trailing-slash
* Add new API/status to track state of the
peripheral connection to the central.
* Add new peripheral status widget for displaying
the current status of the connection to
the central.
Rewrote the direct GPIO kscan driver to match the improvements made to
the matrix driver in 82cb762698 and
f946dc6893. It now uses the same
debouncing system as the matrix driver.
* Remove MISO pin from pinctrl for BDN9 rev2 board, to avoid
the 4th switch being set up for an alternate function, which
was causing spurious key press events to be triggered.
CONFIG_ZMK_BATTERY_NRF_VDDH and CONFIG_ZMK_BATTERY_VOLTAGE_DIVIDER are
now automatically enabled if a DT node with the matching "compatible"
property is present and enabled, so they no longer need to be manually
set for each board.
The key scanning drivers are now automatically enabled when a DT node
with the matching "compatible" property is present and enabled, so they
no longer need to be manually set for each board.
Linking to the document _file path_ rather than the document _URL_
ensures that the link resolves regardless of trailing slash config.
More information is at https://docusaurus.io/docs/docs-markdown-features
battery.c now uses the zmk,battery chosen node to select a battery
sensor. Using the node labeled "BATTERY" is maintained for backwards
compatibility but is now deprecated. Custom boards should switch to
using the chosen node.
# Conflicts:
# app/boards/arm/bluemicro840/bluemicro840_v1.dts
# app/boards/arm/nice60/nice60.dts
# app/boards/arm/nrfmicro/nrfmicro_13.dts
# Conflicts:
# app/boards/arm/bluemicro840/bluemicro840_v1.dts
* Allows removing multilib from docker images
* Run properly in aarch64 host docker
containers for testing on Rasberry Pi.
* Small sticky-keys fix to initialize w/ correct
constant for max uin32_t value.
* Document the Seeed(uino) XIAO interconnect
* Add metadata files for two upstream boards, XIAO and XIAO BLE.
* Add conf and overlay files to properly configure the boards
for ZMK use.
If multiple sticky keys with quick release were nested, only the first one
was properly released. This fix makes sure all of them are released properly.
Fixes https://github.com/zmkfirmware/zmk/issues/1149
We see folks copying this behavior node and duplicating it for the right hand,
then forgetting to modify the "label" value and getting confusing runtime
behavior. If we modify the label to be left-specific like this it might be
a better hint to change it when duplicating it.
To combine multiple sticky modifiers, the sticky keys must ignore
other (sticky) modifier keypresses.
This behavior is important for "callum-style mods", where all modifiers
are sticky mods.
Fixes#829
* Add strlcpy from public domain version.
* Leverage strlcpy to detect truncation of behavior dev strs, and log.
* Use `offsetof` for cleaner detection on peripheral side.
* Use Zephyr auto CCC discovery instead of doing it ourselves.
* Split service versus characteristic discovery into dedicated
steps in the flow.
* Fix for not searching properly when connecting to a peripheral
a second time.
* GATT characteristic allowing passng data + behavior
label to invoke the behavior on the peripheral side.
* Behaviors have a locality setting to specify where they run.
* Build reset/power/RGB on peripheral.
* Add Contra Shield (#1)
* Add bluetooth control layer to contra keymap (#2)
* fix contra keymap issues
* add bluetooth control layer
* clean up contra files
* add contra.conf file
* add missing bracket for default_layer
* update copyright year to 2021
* add contra metadata file
* refactor pro micro overlay for new syntax
* initial files to get stuff working
* Keymap by Ladniy
* Format update to new standards
* keymap update
* header
* Fixed transform, removed left and right .conf files
* Apply suggestions from code review
Formatting
Co-authored-by: Nick Winans <nick@winans.codes>
Co-authored-by: Nick Winans <nick@winans.codes>
* initial commit
* initial commit
* Encode, OLED, and RGB Nice Nano support added as well as refining default keymap.
* tweaking keymap
* Prepared murphpad for PR. Includes adding support for second encoder, OLED, and underglow RGB
* Enabled OLED by default.
* removed naked60 config files
* Per PR feedback from ZMK maintainers, added hardware metadata file and renamed Pro Micro pins.
* removed tabs from keymap and replaced with normal spaces
* Update app/boards/shields/murphpad/murphpad.keymap
Co-authored-by: Nick Winans <nick@winans.codes>
* Update app/boards/shields/murphpad/murphpad.zmk.yml
Co-authored-by: Nick Winans <nick@winans.codes>
* Update app/boards/shields/murphpad/murphpad.zmk.yml
Co-authored-by: Nick Winans <nick@winans.codes>
Co-authored-by: honorless <86894501+lesshonor@users.noreply.github.com>
Co-authored-by: Nick Winans <nick@winans.codes>
* Initial commit of boardsource5x12
* Added copyright/license header
* Update app/boards/shields/boardsource5x12/Kconfig.defconfig
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Update app/boards/shields/boardsource5x12/boardsource5x12.overlay
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Update app/boards/shields/boardsource5x12/Kconfig.shield
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Update app/boards/shields/boardsource5x12/boardsource5x12.keymap
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Swapping keymap for what used in Naked60 as it's another 60 key board, so it keeps it consistent.
* Update app/boards/shields/boardsource5x12/boardsource5x12.keymap
Co-authored-by: Nick Winans <nick@winans.codes>
* renamed layers in boardsource5-12
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Nick Winans <nick@winans.codes>
* Add support for keeb.io fourier
* Update app/boards/shields/fourier/fourier_right.overlay
Co-authored-by: Nick Winans <nick@winans.codes>
* Update app/boards/shields/fourier/fourier_left.overlay
Co-authored-by: Nick Winans <nick@winans.codes>
* Convert spaces to tabs in .dtsi
Co-authored-by: Nick Winans <nick@winans.codes>
* initial commit
* initial commit
* Encode, OLED, and RGB Nice Nano support added as well as refining default keymap.
* tweaking keymap
* Prepared murphpad for PR. Includes adding support for second encoder, OLED, and underglow RGB
* Enabled OLED by default.
* Initial commit with settings updated to match schematic.
* Removing test directories.
* removed naked60 config files
* Fixed dogbone definitions to be full working for murphpad.
* Preparing S40NC for PR
* Removed the murphpad test files that were not supposed to be a part of this PR.
* Changing licensing to be from The ZMK Contributors.
* Changed the licensing in the keymap file to be from The ZMK Contributors
* Update s40nc.keymap
This is a generalization of the existing concept of tri-layer support
that's already well known. Essentially, a conditional-layer
configuration activates a particular layer (the then-layer) when one or
more other layers (the if-layers) are activated.
This is commonly used on ortho keyboards to activate a third "adjust"
layer while the primary two layers ("lower" and "raise") are active.
* Add optional `hold-trigger-key-positions` hold-tap configuration
* Leverage configuration for decision making around when to trigger
hold decision in hold-taps.
* Add docs for new configuration.
* Tests for the new config/decision logic.
Switched the GPIO matrix driver to debouncing using a simple integrator
algorithm. Whenever a key is pressed, we now scan at a rate controlled
by debounce-scan-period-ms (default 1 ms) until all keys are released,
then return to either waiting for an interrupt or polling more slowly.
The timers for key press and release can now be controlled separately,
so debounce-period is deprecated in favor of debounce-press-ms and
debounce-release-ms. Global Kconfig options
ZMK_KSCAN_DEBOUNCE_PRESS_MS and ZMK_KSCAN_DEBOUNCE_RELEASE_MS are also
added to make these easier to set.
Added documentation for debouncing options.
* Some runtimes (e.g. podman), require explicit registries in image URLs
or will prompt for the user to select one, which breaks things like
VSCode remote container rebuilds.
* Make the synthetic "base name" property double underscore prefixed,
since internal, and to avoid future conflicts w/ YAML format add'ns.
* Switch to PS hash dictionaries for our metadata collections for saner
data inspection/use.
* Use unified config template repo that uses an external
build matrix YAML file.
* Proper handling for onboard keyboards, including splits, and
supports for appending the right build matrix once selected.
Recent refactoring of the font handling seems to have broken the display
of the last symbol of the output status widget. From my analysis the
last symbol is truncated because the buffer simply is too small.
Increasing the buffer size to 9 fits all three possible symbols.
For example, Debian Bullseye (current stable) packages Node.js version
12, which is too old to build the docs successfully. At least version 14
is required, and version 16 is current. General advice seems to be to
install from the NodeSource repo instead of your distro's repo, so I
added a suggestion to the docs.
* Add ZMK_HID_CONSUMER_REPORT_USAGES choice to allow choosing
between full consumer usage range, with poor OS compat,
or basic consumer usage range, with broader compat.
* Add new Kconfig settingsx to allow selecting system or dedicated
work queue for performing UI updates.
* Allow UI updates to not block other system tasks when display is
updating, especially important for e-ink displays.
* Workaround for ensuring macOS pairing happens early enough,
for their stack, we require encryption for the hids report map and
report ref characteristics as well, to trigger pairing ealier in the
connection process for macOS.
The security warning applies for downloaded executables. If you are
following the instructions the toolchain is installed with brew and
the security warning does not apply. This is explained in the removed
link.
For split keyboards using an IO expander over TRRS/i2c, if the
right half isn't connected, we should be able to gracefully
fallback to the left side still working.
Refactored the GPIO matrix kscan driver so that only the data and config
structures are defined in the foreach macro. Functionality is unchanged
except for the addition of DT properties to adjust polling speed.
This should make it easier to add other enhancements later, like
improved and customizable debounce behavior.
My Planck rev 6.1 would not register any keys without "col2row".
I also had to apply a matrix_transform in order to move them to the
correct position. Peeking into #228 helped for finding this.
I also add transforms for the 2u spacebar layouts.
* Update default keymap to use SQT
Instead of the invalid “QUOTE”
* Update keymap-example-file.md
* Update docs/docs/keymap-example.md
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Bumped web-tree-sitter to v0.19.4 and added v0.4.0 of
tree-sitter-devicetree, which had to be rebuilt to work in v0.19.x
https://github.com/joelspadin/tree-sitter-devicetree/releases/tag/v0.4.0
Changed how we patch web-tree-sitter to correctly load tree-sitter.wasm
to work with the latest version of Docusaurus. Including a copy of
tree-sitter.wasm as a static resource is no longer needed.
Simple blog post outlining the work done for the Zephyr 2.5 upgrade,
and steps needed to make the most of it.
Co-authored-by: innovaker <66737976+innovaker@users.noreply.github.com>
A hold-tap timer event would be triggered too soon if the hold-tap
was delayed for longer than its tapping-term. This may cause
accidental hold behavior when the correct behavior would be tap.
By queuing the timer event instead of executing it immediately,
other delayed events get a chance to be processed properly.
The current combo completion check only makes sure the last key in the
combo is set. This works when the combo is typed correctly initially, or
when reraising events in a combo of length two. However, it fails for
longer combos since the last event in pressed_keys might be set, but the
first (or subsequent) event in pressed_keys can be NULL thanks to
release_pressed_keys.
Also added a regression test.
This test doesn't test a long combo that completes, but rather one
that's incomplete (so the combo doesn't trigger). Renaming to avoid
confusion when we add more long combo tests.
This commits adds a delay of 20ms on initializing the external
power control driver. Previously, OLED's i2c driver is failing to
initialize the display. This commit fixes that issue.
Signed-off-by: Anthony Amanse <ghieamanse@gmail.com>
This commit fixes the pin definition for BlueMicro840. Based on the
schematics, the blue led is at pin 1.10.
Signed-off-by: Anthony Amanse <ghieamanse@gmail.com>
By setting CONFIG_DEBUG, the native_posix builds will not be optimized
which makes debugging them much nicer.
By setting CONFIG_SYS_CLOCK_TICKS_PER_SEC to 1000, debug prints have a
higher resolution and not always show up as multiples of 10ms.
Quick release for sticky keys failed for non-layer keys. The sticky key
was released just before the key that was supposed to be modified was
handled.
The issue was caused by an error in the sticky key logic, which released
the sticky key before handling the key up event.
Fixes#696.
Previously the colors of operating systems were the same both for dark
and light color scheme. That's not a major issue, but adjusting the
colors for the dark theme to better match the theme looks like an
improvement.
Colors were just darkened by reversing the lightness of each color taken
from the dark theme.
Now, instead of always defaulting to light theme, documentation, docs
will default to the color scheme based by the user preference (reported
by web browser as a `prefers-color-scheme` media query).
It is still possible for user to change the theme by using the switch
next to the search box. His preference will be remembered.
To properly retrigger hold-taps when a combo is not activated, some
position down events are reraised instead of released. The corresponding
position up events were never reraised, causing a potential stuck key.
* Update underglow.md
Updated the documentation according to my current understandring of how to pin-mapping works, also split the chapter into a nrf-section and a non-nrf-section since that information isn't applicable to both
* Ran prettier and updated pin reference according to suggestion
This is an improvement on retro-tap, solving the 'flashing hold' issue
users people experience.
When the tapping-term expires, the hold key is normally pressed. When
retro-tap is enabled, this is undesirable; only an interrupted hold-tap
should trigger the hold behavior.
This change disables the hold behavior for the 'STATUS_HOLD_TIMER'
state when retro-tap is enabled, and makes sure the
'STATUS_HOLD_INTERRUPT' state will be triggered when appropriate.
* Public type for HSB led color.
* New API for calculating "next" HSB based on current
state.
* Update behavior to convert the increment/decrement
commands to absolute command as well.
Added a docs page with tips for setting up VS Code's code completion to work
in ZMK's source files. Info for other IDEs can be added here later as needed.
* feat(nibble): add underglow support for nice_nano builds
* feat(nibble): add encoder to top, left most column to match standard assembly documentation
* refactor(nibble): add layer labels
* feat(nibble): add support for optional display ; off by default
* feat(nibble): add README
* fix(nibble): adjust oled rotation for easier reading
* fix(nibble): add additional note about enabling oled
* refactor(nibble): convert keymap to use tabs instead of spaces
* refactor(nibble): enable oled in dts/overlay by default
* refactor(nibble): cleanup alignment and formatting in nibble keymap
* refactor(nibble): re-align top most row of keymap to be sensible
* refactor(nibble): cleanup kscan map alignment
* refactor(nibble): indent first row of map/transform to properly align with physical columns
* fix(nibble): remove dangling code block from readme
Co-authored-by: KemoNine <mcrosson@kemonine.info>
Add a little delay so any capacitors connected to the ADC for the BVD can charge up when using power_gpios
Co-authored-by: Jasper Smit <jrhrsmit@gmail.com>
* Use lesser-known DT features to skip behaviors not referenced
in the user keymap
* Update the behaviors to skip code if no nodes found.
* Remove some empty config/data structs where unused in
behaviors.
Tap-and-hold a hold-tap to hold the tap behavior so it can repeat.
After a tap, if the same key is pressed within `quick_tap_ms`, the
tap behavior is always picked.
This is useful for things like `&ht LSHFT BACKSPACE` where holding
the backspace is required.
Implements #288.
* Add easier macros for conditional polling/interrupt code.
* Properly continue polling on intervals, without extra
enable/disable code for pins that is superfluous when not trying to
deal with interupts firing.
* Fix to allow multiple GPIO drivers when doing splits w/ IO expanders
Updated docs for the build and flash to have similar content to the new board page.
Added a bit about DFU in case someone were searching for that term.
<!-- Note: ZMK is generally not accepting PRs for new keyboards. New generic controller PRs *may* still be accepted, please discuss on the Discord server first. -->
## PR check-list
- [ ] Branch has a [clean commit history](https://zmk.dev/docs/development/contributing/pull-requests#clean-commit-history)
- [ ] Additional tests are included, if changing behaviors/core code that is testable.
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
- [ ] [Pre-commit](https://zmk.dev/docs/development/local-toolchain/pre-commit) used to check formatting of files, commit messages, etc.
- [ ] Includes any necessary [documentation changes](https://zmk.dev/docs/development/contributing/documentation).
echo "Your recent build failure might be the result of breaking changes made to ZMK's main branch." >> $GITHUB_STEP_SUMMARY
echo "Consider [pinning your ZMK version](https://zmk.dev/blog/2025/06/20/pinned-zmk) to a release for increased stability." >> $GITHUB_STEP_SUMMARY
echo "See also the [list of released versions](https://github.com/zmkfirmware/zmk/releases)." >> $GITHUB_STEP_SUMMARY
echo "If you wish to stay on main, check the most recent pending release PR for breaking changes. [Our blog](https://zmk.dev/blog) may have upgrade information if breaking changes are significant." >> $GITHUB_STEP_SUMMARY
- uses:tj-actions/changed-files@9200e69727eb73eb060652b19946b8a2fdfb654b# pin to v45.0.8 due to https://github.com/tj-actions/changed-files/issues/2463 https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised
* **ble:** Add function to get profile address by index ([#2992](https://github.com/zmkfirmware/zmk/issues/2992)) ([9e905d6](https://github.com/zmkfirmware/zmk/commit/9e905d65936348824588dc3f424755353ac61186))
* **ci:** Add stale GitHub Action to automatically close stale PRs ([#2924](https://github.com/zmkfirmware/zmk/issues/2924)) ([6d7bbc8](https://github.com/zmkfirmware/zmk/commit/6d7bbc8670d175fd63e8c834feb41f80e7b52e74))
* **display:** nice!view individual profile status ([#2265](https://github.com/zmkfirmware/zmk/issues/2265)) ([d09087f](https://github.com/zmkfirmware/zmk/commit/d09087f4dc280b8fdb1d32d63b03cc10162b89ce))
* **metadata:** Add metadata to the mouse_key_press behavior ([#2950](https://github.com/zmkfirmware/zmk/issues/2950)) ([239baa4](https://github.com/zmkfirmware/zmk/commit/239baa487509ace108d36f0e5c627d61a3d95f53))
* **shield:** Add underglow for reviung5 ([#2191](https://github.com/zmkfirmware/zmk/issues/2191)) ([ad6a181](https://github.com/zmkfirmware/zmk/commit/ad6a181d7ec34fb6e31134f6bb991a9b2d0b8f78))
* **shields:** Add a physical layout for a_dux ([#3000](https://github.com/zmkfirmware/zmk/issues/3000)) ([7292df0](https://github.com/zmkfirmware/zmk/commit/7292df02d4b05d783f432f8658de22d940909fe4))
* **shields:** Add physical layouts for tester_xiao and tester_pro_micro ([#2852](https://github.com/zmkfirmware/zmk/issues/2852)) ([eb170c9](https://github.com/zmkfirmware/zmk/commit/eb170c930f56e3fb3df0b813d987abfd1dc31b9a))
* **split:** Add full-duplex wired split support ([147c340](https://github.com/zmkfirmware/zmk/commit/147c340c6e8d377304acfdd64dc86cf83ebdfef2))
* **split:** Runtime selection of split transport ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73))
* **split:** Runtime selection of split transport ([#2886](https://github.com/zmkfirmware/zmk/issues/2886)) ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73))
* **behaviors:** Correct macro release state for parametrized ([1bac680](https://github.com/zmkfirmware/zmk/commit/1bac680c4fb4f07e43c01754b6f1e72dab455e50))
* **behaviors:** Correct macro release state for parametrized macros ([#2942](https://github.com/zmkfirmware/zmk/issues/2942)) ([1bac680](https://github.com/zmkfirmware/zmk/commit/1bac680c4fb4f07e43c01754b6f1e72dab455e50))
* **ble,hid:** Fix smooth scrolling over BLE ([#2998](https://github.com/zmkfirmware/zmk/issues/2998)) ([342d838](https://github.com/zmkfirmware/zmk/commit/342d83891301b1be53233a12c7723bb99cbe5ff6)), closes [#2957](https://github.com/zmkfirmware/zmk/issues/2957)
* **boards:** Disable high voltage DC-DC by default ([#2995](https://github.com/zmkfirmware/zmk/issues/2995)) ([8059e67](https://github.com/zmkfirmware/zmk/commit/8059e671b24a261939401afb5a65c4fa756adc2d)), closes [#2990](https://github.com/zmkfirmware/zmk/issues/2990)
* changed shebang to make scripts more platform independent ([#2893](https://github.com/zmkfirmware/zmk/issues/2893)) ([84772eb](https://github.com/zmkfirmware/zmk/commit/84772ebf14e5a7c67ba573a61f0a50048802c799))
* **ci:** pin tj-actions/changed-files due to compromise ([#2874](https://github.com/zmkfirmware/zmk/issues/2874)) ([4da89bd](https://github.com/zmkfirmware/zmk/commit/4da89bd99716bf6c1d7d788f3cdaec4cee7403e9))
* **combos:** Properly clean up all old candidates. ([#2928](https://github.com/zmkfirmware/zmk/issues/2928)) ([e3030bf](https://github.com/zmkfirmware/zmk/commit/e3030bfcc87b7f511b0ebe993fb1f1f06215982e))
* **combos:** Restore prompts for two deprecated Kconfigs ([#2926](https://github.com/zmkfirmware/zmk/issues/2926)) ([00ff486](https://github.com/zmkfirmware/zmk/commit/00ff48693113ed74a3345aa1ac81fdea302b3a09))
* **core:** Correctly sync BAS battery level ([#2977](https://github.com/zmkfirmware/zmk/issues/2977)) ([af96766](https://github.com/zmkfirmware/zmk/commit/af967667b0e139a963178e63028c7be341cade9e))
* **display:** Make stock battery widget depend on the right symbol ([#2953](https://github.com/zmkfirmware/zmk/issues/2953)) ([9da5d3b](https://github.com/zmkfirmware/zmk/commit/9da5d3ba82b38b74ad798a82a838d84c52220bbe))
* **docs:** Fix soft off waker configuration example ([#2960](https://github.com/zmkfirmware/zmk/issues/2960)) ([eb99b4e](https://github.com/zmkfirmware/zmk/commit/eb99b4ede06bc01674ce16217ebbad40bc11ec50))
* **docs:** remove title as alt text ([#2922](https://github.com/zmkfirmware/zmk/issues/2922)) ([d9576c5](https://github.com/zmkfirmware/zmk/commit/d9576c55346acfc8eed36709aaae28f91e0d06ad))
* Fix build with Studio and USB but not UART ([#2996](https://github.com/zmkfirmware/zmk/issues/2996)) ([cef7af4](https://github.com/zmkfirmware/zmk/commit/cef7af4408cc44c20fab93a0b2e20b3429d0a98e))
* **hid:** Fix scroll value truncation ([#2865](https://github.com/zmkfirmware/zmk/issues/2865)) ([2c0e7da](https://github.com/zmkfirmware/zmk/commit/2c0e7daced1421c34a9d417b7d3e9bccbf0ebd7f)), closes [#2864](https://github.com/zmkfirmware/zmk/issues/2864)
* Properly override stack size on RP2040 ([147c340](https://github.com/zmkfirmware/zmk/commit/147c340c6e8d377304acfdd64dc86cf83ebdfef2))
* **split:** add source to battery event ([#2901](https://github.com/zmkfirmware/zmk/issues/2901)) ([6f85f48](https://github.com/zmkfirmware/zmk/commit/6f85f48b19afae04f98e9abacb36ce1425b61f78))
* **split:** Compile and run properly in wired polling mode. ([#3012](https://github.com/zmkfirmware/zmk/issues/3012)) ([2ae5185](https://github.com/zmkfirmware/zmk/commit/2ae51854192aed92af95536f79547e2928cd1bf5))
* **split:** Conditionally build all split code ([#2884](https://github.com/zmkfirmware/zmk/issues/2884)) ([5bb39ec](https://github.com/zmkfirmware/zmk/commit/5bb39ec3eae23055593350cb3689a8240028181e))
* **split:** Enable wired split by default if DTS is set ([#3010](https://github.com/zmkfirmware/zmk/issues/3010)) ([1530ae3](https://github.com/zmkfirmware/zmk/commit/1530ae36c22e3e2285e895737c74de5d960a5ae4))
* **split:** Minor wired split fixes. ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73))
* Unconditionally define HID payloads to avoid error. ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73))
* Added `toggle-mode`, allowing toggle-on and toggle-off ([#2555](https://github.com/zmkfirmware/zmk/issues/2555)) ([4ef231f](https://github.com/zmkfirmware/zmk/commit/4ef231f4bba87151acfbd1cf3babd83b69813e45))
* added toggle mode to key and layer toggles ([4ef231f](https://github.com/zmkfirmware/zmk/commit/4ef231f4bba87151acfbd1cf3babd83b69813e45))
* **boards:** Update for mikoto board definition ([#1946](https://github.com/zmkfirmware/zmk/issues/1946)) ([b26058b](https://github.com/zmkfirmware/zmk/commit/b26058b6c7c83f8d1f095d2f9c6c3998b391a61b))
* **core:** Make physical layout key rotation optional ([#2770](https://github.com/zmkfirmware/zmk/issues/2770)) ([c367d8f](https://github.com/zmkfirmware/zmk/commit/c367d8f636f0842b414c2b58df6101761cdd676d))
* **display:** Add ability to set display on/off pin. ([#2814](https://github.com/zmkfirmware/zmk/issues/2814)) ([627e6db](https://github.com/zmkfirmware/zmk/commit/627e6dbec99211b3d7cce55904fb1c824ed87bf3))
* **display:** Add config for display update period ([#2819](https://github.com/zmkfirmware/zmk/issues/2819)) ([aa3e5dd](https://github.com/zmkfirmware/zmk/commit/aa3e5dd70fdd1b364fa9ad26f14425be613d180c))
* **mouse:** Add mouse move and scroll support ([#2477](https://github.com/zmkfirmware/zmk/issues/2477)) ([6b40bfd](https://github.com/zmkfirmware/zmk/commit/6b40bfda53571f7a960ccc448aa87f29da7496ac))
* allow kscan-composite to wake up device. ([#2682](https://github.com/zmkfirmware/zmk/issues/2682)) ([a8f5ab6](https://github.com/zmkfirmware/zmk/commit/a8f5ab67b5d449a2624e2de7ddfb264da778ea6c))
* **behaviors:** Make multiple sticky keys work on same key position ([7186528](https://github.com/zmkfirmware/zmk/commit/7186528f77bf077173927c1c8506b4d434e5c371))
* **behaviors:** Make multiple sticky keys work on same key position ([#2758](https://github.com/zmkfirmware/zmk/issues/2758)) ([7186528](https://github.com/zmkfirmware/zmk/commit/7186528f77bf077173927c1c8506b4d434e5c371))
* **ble:** enforce maximum length for dynamic device name ([#2784](https://github.com/zmkfirmware/zmk/issues/2784)) ([ea267b0](https://github.com/zmkfirmware/zmk/commit/ea267b0f35f862b882ac568dde6365c3a0c85099))
* **combos:** Properly report combos len with emply block ([#2739](https://github.com/zmkfirmware/zmk/issues/2739)) ([f0a77b8](https://github.com/zmkfirmware/zmk/commit/f0a77b888ac482a863386ced08e04660ddacb026))
* **display:** Only default mono theme when 1bpp ([#2804](https://github.com/zmkfirmware/zmk/issues/2804)) ([425256b](https://github.com/zmkfirmware/zmk/commit/425256bc0de7ed08802533b170abba78ee90f546))
* **drivers:** Proper static/const for data/config ([#2769](https://github.com/zmkfirmware/zmk/issues/2769)) ([6941abc](https://github.com/zmkfirmware/zmk/commit/6941abc2afab16502cff9c5149d8dc0fcd5112c9))
* Fix warnings in nanopb encoding code ([#2643](https://github.com/zmkfirmware/zmk/issues/2643)) ([7013158](https://github.com/zmkfirmware/zmk/commit/7013158a6715d94b34e8c471ce25bb5005f3bb49))
* Kconfig refactor now works correctly with external modules ([#2711](https://github.com/zmkfirmware/zmk/issues/2711)) ([bb48661](https://github.com/zmkfirmware/zmk/commit/bb486619a183f6df7fbb4620c80164555a22da0b))
* **Kconfig:** Added a name to EC11's trigger mode choice ([40925d4](https://github.com/zmkfirmware/zmk/commit/40925d48e67b3eeaeb3e848a2287ed628de9f674))
* **kscan:** Remove warning when keyboard is built without CONFIG_PM_DEVICE ([#2808](https://github.com/zmkfirmware/zmk/issues/2808)) ([8e065d5](https://github.com/zmkfirmware/zmk/commit/8e065d55b916481ef06ce37cddedb84cf1d15d99))
* **pointing:** Complete header rename missed in refactor ([#2702](https://github.com/zmkfirmware/zmk/issues/2702)) ([84baf92](https://github.com/zmkfirmware/zmk/commit/84baf929c9bb95f255d4bafd0e57f2ec47455fca))
* **ci:** Add release-please automation with VERSION ([#2622](https://github.com/zmkfirmware/zmk/issues/2622)) ([ffa485c](https://github.com/zmkfirmware/zmk/commit/ffa485c11b48444acf3adf1e3c1cb3eed16fad94))
* **drivers:** Support init high/low in 595 driver ([888c0d9](https://github.com/zmkfirmware/zmk/commit/888c0d966cd52f3ab5145992f61b14d6262c1951))
### Bug Fixes
* **boards:** Disable uart serial node in Xiao BLE by default ([#2672](https://github.com/zmkfirmware/zmk/issues/2672)) ([230b860](https://github.com/zmkfirmware/zmk/commit/230b860f31063774c3bcc19afb6f92479462de24))
* **boards:** Fix typo in BT75 metadata ([c9553c3](https://github.com/zmkfirmware/zmk/commit/c9553c31e3a3f39964391b006492995b5bb09c39))
* Disable display feature for settings_reset ([b0f5789](https://github.com/zmkfirmware/zmk/commit/b0f5789b128f0f5599341398898fdb0e0407b2d3))
* include a header file for RC macros ([#2649](https://github.com/zmkfirmware/zmk/issues/2649)) ([f8eff2f](https://github.com/zmkfirmware/zmk/commit/f8eff2fe34609c91211c25113f9d7db09f7d1689))
* **studio:** Improved error message when keyboard is missing a physical layout. ([fed66a9](https://github.com/zmkfirmware/zmk/commit/fed66a92d000f4c8e0019d9ccdd167271324e8e9))
- Review the [Frequently Asked Questions](https://zmkfirmware.dev/docs/faq).
- Check the [Troubleshooting Guide](https://zmkfirmware.dev/docs/troubleshooting) for answers.
- Review the [Frequently Asked Questions](https://zmk.dev/docs/faq).
- Check the [Troubleshooting Guide](https://zmk.dev/docs/troubleshooting) for answers.
- Search the [open issues](https://github.com/zmkfirmware/zmk/issues) for an existing report that
matches your problem.
@@ -47,10 +47,10 @@ To open a report:
- Head to https://github.com/zmkfirmware/zmk/issues/new
- Provide an accurate summary of the issue in the title.
- Provide as much detail as you can about the issue including:
- What [board/shield](https://zmkfirmware.dev/docs/faq#what-is-a-board) you are using.
- What [board/shield](https://zmk.dev/docs/faq#what-is-a-board) you are using.
- A link to the user repository, if you used it to build your firmware.
- Exact steps to reproduce the problem.
- Any relevant screenshots or [logs](https://zmkfirmware.dev/docs/dev-guide-usb-logging)
- Any relevant screenshots or [logs](https://zmk.dev/docs/dev-guide-usb-logging)
## Testing
@@ -81,12 +81,23 @@ documentation to areas not currently covered are greatly appreciated.
- To get started, from the `docs/` directory, run `npm ci` and then `npm start`.
- Enhancements should be submitted as pull requests to the `main` branch of ZMK.
### Formatting
ZMK uses `prettier` to format documentation files. You can run prettier with `npm run prettier:format`.
You can setup git to run prettier automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
### Linting
This repository utilizes ESLint for code linting to ensure consistent code style and identify potential errors or bugs early in the development process.
You can run ESLint with `npm run lint` to verify your changes.
## Code Contributions
### Development Setup
To get your development environment setup going, start at the
[basic setup](https://zmkfirmware.dev/docs/dev-setup) docs, and make sure you can build and flash
[basic setup](https://zmk.dev/docs/development/setup/) docs, and make sure you can build and flash
your own locally built firmware.
### Formatting
@@ -95,6 +106,8 @@ ZMK uses `clang-format` to ensure consist formatting for our source code. Before
changes, make sure you've manually run `clang-format`, or have your IDE configured to auto-format
on save.
You can setup git to run `clang-format` automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
### Commit Messages
The ZMK project is working towards, but not yet enforcing, the use of
@@ -117,4 +130,4 @@ When opening a pull request with your changes, please:
- Requested testing by reviewers or testers.
- Screenshots or logs that support understanding the change.
[ZMK Firmware](https://zmkfirmware.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
[ZMK Firmware](https://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
Check out the website to learn more: https://zmkfirmware.dev/
Check out the website to learn more: https://zmk.dev/.
You can also come join our [ZMK Discord Server](https://zmkfirmware.dev/community/discord/invite)
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite).
To review features, check out the [feature overview](https://zmkfirmware.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
The WeAct Studio BlackPill has grown in popularity due to its low price, availability, and utilization of the powerful STM32F4x1CEU6 microcontroller. The BlackPill features more GPIO than most other boards, but also has a comparatively larger footprint as a result. Many clones and variations of the original BlackPill are available on the market as an affordable and more powerful alternative to many popular boards. The official WeAct variations of the WeAct Studio BlackPill are powered by the STM32F411CEU6 and STM32F401CEU6 microcontrollers.
node_labels:
gpio:blackpill
i2c:blackpill_i2c
spi:blackpill_spi
uart:blackpill_serial
design_guideline:|
ZMK uses the blue color coded pin names to generate devicetree node references. For example, to refer to the pin labeled `17` in the diagram, use `&blackpill 17` in the devicetree files.
The SparkFun Pro Micro grew popular as a low cost ATmega32U4 board with sufficient GPIO and peripherals
to work for many keyboard needs. Since the original Pro Micro, many pin compatible boards have appeared,
with various changes or improvements, such as the Elite-C w/ USB-C, nice!nano with nRF52840 wireless.
Note: ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyr™ only
supports 32-bit and 64-bit platforms. As a result, controllers like the SparkFun Pro Micro and the Elite-C
are *not* supported by ZMK.
node_labels:
gpio:pro_micro
i2c:pro_micro_i2c
spi:pro_micro_spi
uart:pro_micro_serial
design_guideline:|
ZMK uses the blue color coded "Arduino" pin names to generate devicetree node references. For example, to refer to the pin labeled `0` in the diagram, use `&pro_micro 0` in the devicetree files.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.