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>
All credit for this one goes to @xudongzheng (thanks for helping debug
this!). Should fix the issue where keyboards go unresponsive after their
host machine wakes from sleep due to the USB driver entering an error
state. I was able to both reliably reproduce the issue before the patch
goes in and confirmed it no longer occurs post patch.
The `USB_DC_RESUME` state indicates the host event has resumed the connection.
Adding it to the list of valid connection states to prevent the error
when waking from sleep.
Zephyr API Link:
https://docs.zephyrproject.org/apidoc/latest/group____usb__device__controller__api.html#gac09e3e0af1a2b41a5bfbad91f900baf7fixes#1372
* This is a very simple fix to a rather complicated issue. Essentially,
hold-taps will "release" (raise) their captured keys before actually
telling the event manager they have captured a key. This means the event
manager ends up assigning the `last_listener_index` to the hold-tap
subscription rather than the combo. So when the combo calls
`ZMK_EVENT_RELEASE` it raises after the hold-tap instead of after the
combo as the combo code expects.
* The corresponding test (which fails without this change) has also been added.
* An event can be captured and released in the same event handler, before
the last_listener_index would have been updated. This causes some handlers
to be triggered multiple times.
* The solution is to update the last_listener_index before calling the next
event handler, so capturing and releasing within an event handler is harmless.
* Also see discussion at https://github.com/zmkfirmware/zmk/pull/1401
* If our handler dedides our undedided hold-tap,
return early before continuing.
* Fix incorrect pointer logic, resulting in combo
candidate filtering leaving incorrect timeout details.
Co-authored-by: Andrew Rae <ajrae.nv@gmail.com>
Co-authored-by: okke <okke@formsma.nl>
* add support for Spaceman Pancake
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Jason Hazel <jhazel@matrixmediaservices.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Add optional Kconfig setting to delay scanning after each
output column is set, and inputs are read, to allow inputs
to "settle" after the last column is set back to inactive.
Two new options for functionality to enable/disable RGB for
USB status or idle events.
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: ReFil <harryherring@gmail.com>
* Proporly handle multiple conditonal layers w/ the same target
`then-layer` values.
* Move handling to work callback, to avoid re-entrance for cascading
layers enabling other layers.
* Move to ZephyrBuildConfig package based on Zephyr best practices.
* Support multiple shields properly, e.g. -DSHIELD="foo bar", which
allows using existing upstream shields like `ssd1306_128x64` along
with another ZMK shield.
* Properly *add* the "ZMK config" .conf file to the conf file list,
so that existing board .conf files in `app/boards/<board>.conf` are
properly honored still. Needed for overrides to usptream boards when
combined with a local `<shield>.conf` file.
* Add new API/status to track state of the
peripheral connection to the central.
* Add new peripheral status widget for displaying
the current status of the connection to
the central.
Rewrote the direct GPIO kscan driver to match the improvements made to
the matrix driver in 82cb762698 and
f946dc6893. It now uses the same
debouncing system as the matrix driver.
* Remove MISO pin from pinctrl for BDN9 rev2 board, to avoid
the 4th switch being set up for an alternate function, which
was causing spurious key press events to be triggered.
CONFIG_ZMK_BATTERY_NRF_VDDH and CONFIG_ZMK_BATTERY_VOLTAGE_DIVIDER are
now automatically enabled if a DT node with the matching "compatible"
property is present and enabled, so they no longer need to be manually
set for each board.
The key scanning drivers are now automatically enabled when a DT node
with the matching "compatible" property is present and enabled, so they
no longer need to be manually set for each board.
battery.c now uses the zmk,battery chosen node to select a battery
sensor. Using the node labeled "BATTERY" is maintained for backwards
compatibility but is now deprecated. Custom boards should switch to
using the chosen node.
# Conflicts:
# app/boards/arm/bluemicro840/bluemicro840_v1.dts
# app/boards/arm/nice60/nice60.dts
# app/boards/arm/nrfmicro/nrfmicro_13.dts
# Conflicts:
# app/boards/arm/bluemicro840/bluemicro840_v1.dts
* Allows removing multilib from docker images
* Run properly in aarch64 host docker
containers for testing on Rasberry Pi.
* Small sticky-keys fix to initialize w/ correct
constant for max uin32_t value.
* Document the Seeed(uino) XIAO interconnect
* Add metadata files for two upstream boards, XIAO and XIAO BLE.
* Add conf and overlay files to properly configure the boards
for ZMK use.
If multiple sticky keys with quick release were nested, only the first one
was properly released. This fix makes sure all of them are released properly.
Fixes https://github.com/zmkfirmware/zmk/issues/1149
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
* Add strlcpy from public domain version.
* Leverage strlcpy to detect truncation of behavior dev strs, and log.
* Use `offsetof` for cleaner detection on peripheral side.
* Use Zephyr auto CCC discovery instead of doing it ourselves.
* Split service versus characteristic discovery into dedicated
steps in the flow.
* Fix for not searching properly when connecting to a peripheral
a second time.
* GATT characteristic allowing passng data + behavior
label to invoke the behavior on the peripheral side.
* Behaviors have a locality setting to specify where they run.
* Build reset/power/RGB on peripheral.
* Add Contra Shield (#1)
* Add bluetooth control layer to contra keymap (#2)
* fix contra keymap issues
* add bluetooth control layer
* clean up contra files
* add contra.conf file
* add missing bracket for default_layer
* update copyright year to 2021
* add contra metadata file
* refactor pro micro overlay for new syntax
* initial files to get stuff working
* Keymap by Ladniy
* Format update to new standards
* keymap update
* header
* Fixed transform, removed left and right .conf files
* Apply suggestions from code review
Formatting
Co-authored-by: Nick Winans <nick@winans.codes>
Co-authored-by: Nick Winans <nick@winans.codes>
* initial commit
* initial commit
* Encode, OLED, and RGB Nice Nano support added as well as refining default keymap.
* tweaking keymap
* Prepared murphpad for PR. Includes adding support for second encoder, OLED, and underglow RGB
* Enabled OLED by default.
* removed naked60 config files
* Per PR feedback from ZMK maintainers, added hardware metadata file and renamed Pro Micro pins.
* removed tabs from keymap and replaced with normal spaces
* Update app/boards/shields/murphpad/murphpad.keymap
Co-authored-by: Nick Winans <nick@winans.codes>
* Update app/boards/shields/murphpad/murphpad.zmk.yml
Co-authored-by: Nick Winans <nick@winans.codes>
* Update app/boards/shields/murphpad/murphpad.zmk.yml
Co-authored-by: Nick Winans <nick@winans.codes>
Co-authored-by: honorless <86894501+lesshonor@users.noreply.github.com>
Co-authored-by: Nick Winans <nick@winans.codes>
* Initial commit of boardsource5x12
* Added copyright/license header
* Update app/boards/shields/boardsource5x12/Kconfig.defconfig
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Update app/boards/shields/boardsource5x12/boardsource5x12.overlay
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Update app/boards/shields/boardsource5x12/Kconfig.shield
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Update app/boards/shields/boardsource5x12/boardsource5x12.keymap
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
* Swapping keymap for what used in Naked60 as it's another 60 key board, so it keeps it consistent.
* Update app/boards/shields/boardsource5x12/boardsource5x12.keymap
Co-authored-by: Nick Winans <nick@winans.codes>
* renamed layers in boardsource5-12
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Nick Winans <nick@winans.codes>
* Add support for keeb.io fourier
* Update app/boards/shields/fourier/fourier_right.overlay
Co-authored-by: Nick Winans <nick@winans.codes>
* Update app/boards/shields/fourier/fourier_left.overlay
Co-authored-by: Nick Winans <nick@winans.codes>
* Convert spaces to tabs in .dtsi
Co-authored-by: Nick Winans <nick@winans.codes>
* initial commit
* initial commit
* Encode, OLED, and RGB Nice Nano support added as well as refining default keymap.
* tweaking keymap
* Prepared murphpad for PR. Includes adding support for second encoder, OLED, and underglow RGB
* Enabled OLED by default.
* Initial commit with settings updated to match schematic.
* Removing test directories.
* removed naked60 config files
* Fixed dogbone definitions to be full working for murphpad.
* Preparing S40NC for PR
* Removed the murphpad test files that were not supposed to be a part of this PR.
* Changing licensing to be from The ZMK Contributors.
* Changed the licensing in the keymap file to be from The ZMK Contributors
* Update s40nc.keymap
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.
Switched the GPIO matrix driver to debouncing using a simple integrator
algorithm. Whenever a key is pressed, we now scan at a rate controlled
by debounce-scan-period-ms (default 1 ms) until all keys are released,
then return to either waiting for an interrupt or polling more slowly.
The timers for key press and release can now be controlled separately,
so debounce-period is deprecated in favor of debounce-press-ms and
debounce-release-ms. Global Kconfig options
ZMK_KSCAN_DEBOUNCE_PRESS_MS and ZMK_KSCAN_DEBOUNCE_RELEASE_MS are also
added to make these easier to set.
Added documentation for debouncing options.
Recent refactoring of the font handling seems to have broken the display
of the last symbol of the output status widget. From my analysis the
last symbol is truncated because the buffer simply is too small.
Increasing the buffer size to 9 fits all three possible symbols.