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.