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