zmk/app/src
Joel Spadin 6e7e0de2b6
feat(endpoints): add "no endpoint" value (#3140)
feat(endpoints): add "no endpoint" value

This adds ZMK_TRANSPORT_NONE, which can be set as the preferred
endpoint transport if you wish to prevent the keyboard from sending any
output. More usefully, it also is used to indicate that the preferred
endpoint is not available and it could not fall back to an available
one. To go along with this, many endpoint functions are renamed for
consistency, and a few new functions are added:

- zmk_endpoint_get_preferred_transport() returns the value that was set
  with zmk_endpoint_set_preferred_transport().

- zmk_endpoint_get_preferred() returns the endpoint that will be used
  if it is available. This endpoint always has the same transport as
  zmk_endpoint_get_preferred_transport().

- zmk_endpoint_is_connected() is a shortcut to check if the keyboard is
  actually connected to an endpoint.

This change is based on #2572 but without the option to disable endpoint
fallback. It does refactor code to allow adding that feature later.

fix(endpoints): Add endpoint setting upgrade

Adding ZMK_TRANSPORT_NONE at the start of enum zmk_transport results in
the preferred transport setting no longer representing the same values
when it is saved with earlier firmware and loaded with newer firmware.

To fix this, the "endpoints/preferred" setting is now deprecated and
replaced by "endpoints/preferred2". If the old setting is present, it
is interpreted as the old enum type, upgraded to the new type, and saved
immediately to the new setting. The old setting is then deleted.

To avoid this happening again in the future, enum zmk_transport now has
explicit values assigned to identifier, and a comment is also added to
explain that existing values must not be changed.

fix: Set default transport according to enabled transports

The default value for preferred_transport is now set to USB only if
CONFIG_ZMK_USB is enabled. If not, it falls back to BLE if
CONFIG_ZMK_BLE is enabled, then to "none" if nothing is enabled.
2026-02-12 01:51:42 -05:00
..
behaviors feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
boot SoC: stm32c0 support (#3174) 2026-01-07 18:05:13 -05:00
display feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
events
pointing feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
settings
split feat(pointing): Release pressed keys on disconnect (#3204) 2026-01-14 13:17:43 -05:00
studio feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
activity.c feat!: Move to zephyr v4.1 (#3060) 2025-12-09 19:43:22 -05:00
backlight.c
battery.c fix(core): Correctly sync BAS battery level (#2977) 2025-07-31 17:51:21 -04:00
behavior.c feat!: Move to zephyr v4.1 (#3060) 2025-12-09 19:43:22 -05:00
behavior_queue.c chore: Formatting fix. 2024-09-23 10:31:43 -06:00
ble.c refactor(ble): use Zephyr macros for advertising data (#3173) 2026-01-11 17:12:28 -07:00
combo.c fix(combos): Properly clean up all old candidates. (#2928) 2025-04-22 01:17:12 -04:00
conditional_layer.c feat: Allow layer behaviors to "lock" layers on (#2717) 2025-11-14 23:13:35 +01:00
endpoints.c feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
event_manager.c
ext_power_generic.c feat(power): Support multiple ext_power GPIOS 2024-09-25 15:30:45 -04:00
gpio_key_wakeup_trigger.c fix(pm): Properly configure a wakeup as input. 2024-08-02 16:37:11 -07:00
hid.c fix(hid): initialize missing d_scroll_x field in mouse report (#3196) 2026-01-07 17:16:24 -05:00
hid_indicators.c feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
hid_listener.c feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
hog.c fix(ble,hid): Fix smooth scrolling over BLE (#2998) 2025-07-20 09:13:18 -06:00
keymap.c fix(keymap): Fix overflow in get/set bindings (#3205) 2026-01-16 18:55:13 -05:00
kscan_sideband_behaviors.c fix: Defer auto enabling of kscan sideband. 2024-10-08 10:20:39 -06:00
main.c fix(display): POSIX lvgl fixes (#2812) 2025-02-07 02:05:21 -05:00
matrix_transform.c feat: Add keyboard physical layout system. 2024-07-03 16:52:05 -06:00
physical_layouts.c fix: Fix redundant const warning (#3139) 2025-12-14 16:39:39 -05:00
pm.c feat(endpoints): add "no endpoint" value (#3140) 2026-02-12 01:51:42 -05:00
rgb_underglow.c
sensors.c feat!: Move to zephyr v4.1 (#3060) 2025-12-09 19:43:22 -05:00
stdlib.c
usb.c fix(usb): detect USB power mode to fallback to BLE 2024-10-14 19:15:45 -04:00
usb_hid.c fix(display): POSIX lvgl fixes (#2812) 2025-02-07 02:05:21 -05:00
workqueue.c pre-commit: re-format using clang-format hook (v18.1.8) 2024-09-13 16:04:26 -06:00
wpm.c