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