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