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.
* 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>
* 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>
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.
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.