Commit Graph

1471 Commits

Author SHA1 Message Date
Xudong Zheng ea267b0f35
fix(ble): enforce maximum length for dynamic device name (#2784) 2025-02-26 13:29:30 -05:00
Pete Johanson 2fe55c4c41
refactor(behaviors): Minor RAM usage tweaks (#2839)
Follow up cleanup of some config structs not marked as const.
2025-02-26 13:17:23 -05:00
Pete Johanson 209085da73
refactor(behaviors): Add max-held tap-dance config (#2838)
refactor(behaviors): Add max-held tap-dance config

Add new `CONFIG_ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD` config for reducing RAM
usage on more constrained devices.

refactor(behaviors): Move defaults to Kconfig.defaults
2025-02-25 14:12:27 -05:00
Pete Johanson 18d0d2f476
refactor(combos): Reduce combo RAM usage (#2837)
Properly mark combo configs as `const` so they are place in flash,
not RAM.
2025-02-25 13:38:51 -05:00
Pete Johanson aa3e5dd70f
feat(display): Add config for display update period (#2819)
Add `CONFIG_ZMK_DISPLAY_TICK_PERIOD_MS` Kconfig to allow tweaking
the period between display updates.
2025-02-10 13:32:16 -05:00
Pete Johanson 627e6dbec9
feat(display): Add ability to set display on/off pin. (#2814)
Zephyr is still working on the plan upstream for generically controlling
display "backlight" pins with GPIO/PWM, so in the meantime, add our
own chosen property `zmk,display-led` that is set to an LED device child
to allow blanking/unblanking of devices that use a dedicated backlight
control pin.
2025-02-07 17:49:30 -07:00
Alex Rozhkov 424e53210e
feat(shields): Add physical layout for Lotus58 (#2753)
Added physical layout and studio support for Lotus58.
2025-02-07 14:35:13 -05:00
Pete Johanson 4b4a8a35f3
fix(display): POSIX lvgl fixes (#2812)
fix(display): Do LVGL task processing in main on POSIX.

An SDL/Zephyr bug prevents proper display when SDL calls are
made from anything but the main thread, so add task handling
in our simple main function when on POSIX.

fix(usb): Compilation fix for 64-bit targets

Properly handle differences in the size of `size_t` on 64-bit
architectures.

fix(display): Imply, but don't force, LVGL mono theme

Some targets may be using color displays, so instead of forcing
on the mono theme, merely imply it to default it
2025-02-07 02:05:21 -05:00
Cem Aksoylar 0f7c11248a
feat(pointing): Add pre-defined scroll scaler and mouse scroll tests (#2759)
feat(pointing): Add pre-defined scroll scaler

tests(pointing): Add mouse scroll tests
2025-02-04 10:27:14 -07:00
Nicolas Munnich 8e065d55b9
fix(kscan): Remove warning when keyboard is built without CONFIG_PM_DEVICE (#2808) 2025-02-01 11:16:52 -07:00
Pete Johanson 425256bc0d
fix(display): Only default mono theme when 1bpp (#2804)
In order to have flexibility for color displays, only imply the mono
theme if we have 1bpp.
2025-01-31 22:53:35 -05:00
Xudong Zheng 40e9e5c5fa
test(split): remove build banner from snapshot (#2787)
The test snapshot will otherwise be outdated each time there is a new
commit on https://github.com/zmkfirmware/zephyr.
2025-01-21 12:40:27 -05:00
Pete Johanson e4f1454e0b
refactor(keymap): Reduce flash usage for studio builds (#2771)
When building for ZMK Studio, we can use the constant stock keymap
for init of the in-memory keymap, to avoid duplicate flash usage
for the keymap from the devicetree.
2025-01-15 16:51:26 -05:00
Pete Johanson c367d8f636
feat(core): Make physical layout key rotation optional (#2770)
To be able to save on flash space, for layouts on space constrained
devices that don't require rotation, make key rotation props
optional behind a new Kconfig flag.
2025-01-15 16:48:18 -05:00
Pete Johanson 6941abc2af
fix(drivers): Proper static/const for data/config (#2769)
Save a tiny bit of RAM by properly marking our device config
struct instances const consistently, and also add missing static
modifiers to properly isolate config/data for drivers.
2025-01-15 12:35:35 -05:00
Pete Johanson 8dddb1d9d7
Testing: split input test (#2762)
test(pointing): Add mock input device.

New mock input device to generate input events for tests.

test(split): Add peripheral input test.

Test event propagation from peripheral input devices.

fix(split): Proper scoping for local within switch.

Minor compile fix.

chore: Fix up test snapshots after logging changes.

Adjust the test snapshots after logging changes to the central.

fix(kscan): Don't fire last mock event twice.

Fix a bug where the kscan mock would raise the last mock event
twice before halting processing.
2025-01-13 15:15:16 -05:00
Pete Johanson d0ee30bfaa
Testing: split ble encoder test (#2754)
test(sensors): Add mock encoder sensor

Add a new mock sensor driver for generating mock encoder sensor channel
data.

test(split): Add a peripheral sensor split test

Test BLE split logic for peripheral sensors (encoders).
2025-01-06 14:41:02 -05:00
Pete Johanson 36508c27fd
fix(studio): Allow adding layers after a layer move (#2748)
Properly return the available layers in the move layer response.
2025-01-03 19:19:19 -05:00
Pete Johanson e6343f44ce
test(split): Test split HID indicator setting. (#2747)
Add integration test for HID indicator state being propagated
to split peripherals.
2025-01-03 18:05:18 -05:00
Willow Herring 05abd677c5
chore: Add trailing lines to fix build warnings (#2743)
When building a unibody or central warnings get thrown for the backslash newlines at EOF in combos.h and input_listeners.h. Adding a trailing newline to the affected files rectifies this
2025-01-02 08:58:49 -07:00
Pete Johanson f0a77b888a
fix(combos): Properly report combos len with emply block (#2739)
Handle the scenario where there is an empty combos block and return
a zero combos length.
2025-01-01 18:14:53 -05:00
Pete Johanson 85aba16eec
testing: Add split BLE tests (#2737)
* Enhance the BLE test runner to build additional peripheral builds
  when detecting peripheral*.overlay files in the test.
* Add basic and multiple-peripheral tests to exercise the testing
  support
* Add test for triggering local behaviors on split peripherals.

fix(ble): Fix building split code w/o settings

* Properly exclude storing peripheral addresses to settings when
  settings support isn't turned on.
2025-01-01 18:13:47 -05:00
Robert U 3f6841c95f
chore: Allow running tests from anywhere and support EXTRA_MODULES (#2725)
* Allow running tests from anywhere in the workspace
* Trigger test workflow if run-test.sh changes
2024-12-20 15:19:56 -05:00
Nicolas Munnich bb486619a1
fix: Kconfig refactor now works correctly with external modules (#2711) 2024-12-18 23:32:30 -07:00
Pete Johanson cb867f92db
Feature: input processor behavior invocation (#2714)
refactor(pointing): Allow stopping event propagation

    Allow input processors to return a special value if a given input event
    should not be further processed/propagated.

feat(pointing): Add behavior input processor

    Add the ability to intercept certain input events and trigger behaviors
    when they occur.

Co-authored-by: Jorge Villalobos <minusfive@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-12-17 20:50:06 -05:00
Nicolas Munnich 4ef231f4bb
feat: Added `toggle-mode`, allowing toggle-on and toggle-off (#2555)
feat: added toggle mode to key and layer toggles

docs: documented toggle mode changes
2024-12-12 19:13:56 -05:00
Joel Spadin 7013158a67
fix: Fix warnings in nanopb encoding code (#2643)
The "arg" field on nanopb structs is a void* because it is shared
between the encode and decode callbacks, even though the encode
callback probably should not modify the data. We are passing const data
using this non-const pointer, which causes warnings about discarding
const. This commit explicitly casts to void* to suppress these warnings.
2024-12-11 15:00:48 -05:00
svek1 a8f5ab67b5
fix: allow kscan-composite to wake up device. (#2682)
* include kscan.yaml so we can set kscan-composite as a wakeup source
* modify enable and disable callback to check for wakeup capabilities of
composite and children
* disable children wakeup source

The disable function is only called
when the composite is not an enabled wakeup source.
In that case the children should also not be an enabled
wakeup source, so they can get suspended
2024-12-11 14:46:22 -05:00
Pete Johanson 84baf929c9
fix(pointing): Complete header rename missed in refactor (#2702)
* Update a few mouse.h -> pointing.h missed refactors.
2024-12-10 02:29:35 -05:00
Pete Johanson 6b40bfda53
feat(mouse): Add mouse move and scroll support (#2477)
* feat(mouse): Add mouse move and scroll support

    * Use Zephyr input subsystem for all pointers.
    * Input processors for modifying events, e.g. scaling, swapping
      codes, temporary (mouse) layers, etc.
    * Mouse move/scroll behaviors.
    * Infrastructure in place for physical pointer input devices.

* feat: Add input split support.

* docs: Add initial pointer docs.

---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Robert U <urob@users.noreply.github.com>
Co-authored-by: Shawn Meier <ftc@users.noreply.github.com>
Co-authored-by: Chris Andreae <chris@andreae.gen.nz>
Co-authored-by: Anant Thazhemadam <47104651+thazhemadam@users.noreply.github.com>
Co-authored-by: Erik Tollerud <erik.tollerud@gmail.com>
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
2024-12-09 19:45:41 -05:00
pabile 7e8c542c94
feat(studio): Add ortho_4x10 grid layout (#2651)
* added 4x10 grid layout

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-12-09 12:53:54 -05:00
Pete Johanson 0820991901
fix(studio): Properly return complete keymap from RPC (#2696)
Ensure the set active physical layout RPC returns the full keymap
details including the available layers.
2024-12-06 18:10:58 -05:00
yuki b26058b6c7
feat(boards): Update for mikoto board definition (#1946)
* Set default revision to 5.20
* update mikoto board defs
* add revision info to mikoto.zmk.yml
* use zephyr aliases to handle mikoto_520
* enable pull-ups for on-board i2c
2024-12-05 02:02:58 -05:00
Nicolas Munnich 40925d48e6
refactor(Kconfig): Extracted designer defaults out into new files (#2537)
docs: Fix incorrect kconfig default values

fix(Kconfig): Added a name to EC11's trigger mode choice, allowing it to be set in device Kconfig.defconfig

refactor(Kconfig): Moved designer defaults out into new files
2024-12-04 16:19:35 -05:00
Pete Johanson a9ff3a78a1
chore(main): release 0.1.0 (#2657) 2024-12-04 14:26:12 -05:00
Cem Aksoylar 230b860f31
fix(boards): Disable uart serial node in Xiao BLE by default (#2672) 2024-11-25 17:19:13 -05:00
Pete Johanson fb359f5766
feat(boards): Add glove80 nexus node for extension GPIO. (#2594)
Add generic extension nexus node for consistent GPIO access
to the extension pins in a left/right agnostic way.
2024-11-20 18:36:32 -05:00
Pete Johanson ffa485c11b
feat(ci): Add release-please automation with VERSION (#2622)
* Add VERSION file that Zephyr will pick up
* Add release-please automation
* Updated docs on commits messages, and PR process
* Updated PR template to match.

---


Release-As: 0.1.0

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-11-18 16:46:26 -05:00
esplo f8eff2fe34
fix: include a header file for RC macros (#2649) 2024-11-16 09:51:21 +01:00
Peter Johanson 888c0d966c feat(drivers): Support init high/low in 595 driver
Add support for initializing a pin to a given high/low value during
configuration. Needed for proper initialization by systems like
GPIO hogs or gpio-leds Zephyr drivers.
2024-11-15 11:00:37 -07:00
Nicolas Munnich fed66a92d0 fix(studio): Improved error message when keyboard is missing a physical layout. 2024-11-13 11:38:41 -07:00
Cem Aksoylar b0f5789b12 fix: Disable display feature for settings_reset 2024-11-12 18:38:33 -07:00
Alexander Krikun 4438b7b835 feat(boards): add nrf52840-nosd snippet
Add snippet to build for nRF52840 boards while ignoring the SoftDevice.
This might be useful for especially memory-intensive applications.
2024-11-12 18:28:59 -07:00
Alexander Krikun 63af296b6e feat(boards): add nrf52833-nosd snippet
Add snippet to build for nRF52833 boards while ignoring the SoftDevice.
This is necessary as those boards are memory-constrained.
2024-11-12 18:28:59 -07:00
ReFil c9553c31e3 fix(boards): Fix typo in BT75 metadata
Spotted this underscore that shouldn't be there when reading the studio blog post
2024-11-12 13:44:56 -07:00
Joel Spadin c7473fc325 fix: Fix inconsistent column offset property
Renamed the composite kscan's column-offset property to col-offset for
consistency with other properties such as matrix transform's col-offset
and matrix kscan's col-gpios.
2024-11-12 09:07:25 -07:00
Nicolas Munnich 99b8506437 refactor: new physical layouts convention 2024-11-06 15:29:22 -07:00
Joel Spadin cf2c46734d feat(boards): Add numpad layouts
Added physical layouts for the following variants of numpads:

- With and without extra top row
- 2U plus key or 1U plus and backspace keys
- 2U 0 key or 1U 0 and 00 keys
- Full 1U grid/macropad layout

Other layouts exist, such as "southpaw" horizontally mirrored layouts,
and layouts with a fifth column, but those seem to be much less common.
2024-11-06 11:35:51 -07:00
Peter Johanson 19a096ab67 fix(keymap): Set bindings with changed layout
* Fix bug with setting keymap layer bindings when a non-stock layout
  is selected.
2024-11-04 13:30:40 -07:00
Peter Johanson 249ecbc7e6 fix(studio): Bump nanopb version with build fixes.
* Pull in fixes for prefering generator/protoc instead of the
  host protoc, for better compatibility.
2024-11-01 13:17:29 -06:00