mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
refactor: Move to Zephyr v4.1.0 Move to Zephyr v4.1.0, with various build/compilation fixes needed for basic use. refactor(tests): Move to native_sim for tests. feat(core): (Optionally) use Zephyr keyboard input devices Add ability to assign a keyboard `input` device to a physical layout, or use a chosen `zmk,matrix-input`. fix(pointing): Refactor for changes to input API Pass NULL user_data to input callbacks. fix(tests): Fix BLE test to account for Zephyr changes Handle additional read callback invocation once all matching characteristic have been read. fix(sensors): Initialize sensor data to 0 before fetching. Be sure we don't get back any uninitialized data by initializing the channel data to 0 before calling into the sensor API. refactor(input): Adjust split input to input API changes. Input callbacks now have a user_data parameter, adjust accordingly. chore(bluetooth): Minor cleanup of split BT code after refactor Small fixes and remove commented dead code left after the split refactor. refactor: Fix up BLE tests after Zephyr upgrade. Minor changes to snapshots based on newer Zephyr version. refactor(boards): Move to upstream xiao_ble board ID. Move to official upstream board definition for the Seeed XIAO BLE. refactor: Adjust metadata schema for HWMv2 board IDs w/ qualifiers Adjust our ZMK metadata to allow for board IDs that include qualifiers with slash delimeters. refactor!(boards): Move nice!nano to HWMv2, and proper revisioning Upgrade the nice!nano board to HWMv2, under the proper nicekeyboards vendor directory, and with proper revisions. Includes a breaking change to default the `2.0.0` version instead of the much older v1 (`1.0.0`). fix: Disable Nordic dt-bindings header checks. Disable the recently added Nordic dt-bindings header checks, which cause issues for our HID related headers. fix(studio): Correct `memset` usage. Use the correct memset call to clear our RPC memory. fix: Refactor for new Zephyr PM API Adjustments to our PM code to match Zephyr PM APIs. refactor(ble): Use correct BT opt for connectable. Adjust for upstream Zephyr BT API changes for advertising options. refactor(boards): Move MakerDiary M2 board to HWMv2. Run the HWMv2 script to convert the MakerDiary M2 board. fix(studio): Correct usage of thread analyzer API Fix up the RPC code that invoke the thread analyzer API to account for API changes. chore: Remove nanopb module override. Leverage nanopb version that's used by Zephyr. feat(core): mapper for magic bootloader values. To trigger bootloaders that use a magic value in RAM to trigger bootloader mode, add a mapping retained memory driver that maps write/read of boot mode values to a special magic value stored in the actually backing RAM. feat(behaviors): Add retention boot mode to reset. Support new generic Zephyr retention boot mode API in the reset behavior. feat: Add double tap to enter bootloader functionality Add ability to enter the bootloader if double tapping reset within the specified window. refactor(CI): Move to 4.1 container tags. Move to the new 4.1 tagged container, to ensure updated SDK, Python packages, etc. refactor(boards): Move nRFMicro to HWMv2 Refactor nRFMicro to HWMv2, using proper SoC, revisions, and variants (for flipped). Also move to devicetree setup of DCDC/HV DCDC. refactor(boards): Move QMK Proton-C to HWMv2 Move Proton-C to HWMv2 for use with Zephyr 4.1. chore(ci): Adjust core coverage for new board IDs. Use correct board IDs, with qualifiers, for our core coverage testing. refactor(boards): Move BDN9 to HWMv2 Move BDN9 to HWMv2, using the base `bdn9` ID, no longer including the `_rev2` suffix in the ID. refactor(boards): Move nice!60 to HWMv2 Migrate nice!60 to HWMv2. refactor: Adjust how we're searching/loading keymap files Use new post_boards_shields extension point for loading keymap files from board/shield directories. refactor(boards): Move planck rev6 to HWMv2. Move Planck board definition to HWMv2, including versioning tweaks. refactor(boards): Move OLKB Preonic to HWMv2 Move Preonic board definition to HWMv2 and remove `_rev3` variant suffix in favor of board versioning with `3.0.0` as the default. chore(deps): Pull in Zephyr optional group for nanopb. Ensure we enable nanopb by adding +optional group filter. fix(ci): Prevent slash characters in artifact names. Move to HWMv2 means board IDs often include slashes, so replace those with underscores when doing file uploads. fix(usb): Adjust Kconfig settings for USB. * Ensure USB isn't initialized automatically before we do, which can happen if USB CDC logging is used/enabled for a given board. * Adjust USB HID to initialize the USB class/interface before we enable the USB device itself. fix(display): Fix setting the small font for the mono theme. Adjust for modified mono theme init function to pass the small font. chore(ci): Fix changed board IDs for core coverage. Adjust board IDs for our core coverage after move to HWMv2 and board versioning consistently. * planck_rev6 -> planck * bdn9_rev2 -> bdn9 fix(underglow): Remove use of removed Kconfig WS2812 symbol refactor(boards): Move PW CKP boards to HWMv2 Migrate the bt60, bt65, and bt75 to HWMv2. refactor(boards): Move Puchi BLE to HWMv2 Migrate the Puchi BLE to HWMv2. refactor(boards): Migrate Ferris rev02 to HWMv2. Move Ferris rev02 to HMWv2, and remove the revision from the ID. refactor(boards): Move Pillbug to HWMv2 Migrate the MechWild PillBug board to HWMv2. refactor(boards): Migrate s40nc to HWMv2 Move the ShortyFortyNoCordy (s40nc) to HWMv2. refactor(boards): Move bluemicro840 board to HWMv2. Migrate bluemicro840 board to HWMv2, set up boot mode retention. fix(boards): Retore bootloader support on XIAO BLE. Set up necessary boot mode/retention to properly set GPREGRET to trigger Adafruit bootloader to run on the XIAO BLE. refactor(boards): Move Adv360 Pro to HWMv2. Migrate Adv360 Pro left/right to HWMv2. refactor(boards): Move Glove80 to HMWv2 Refactor the MoErgo Glove80 left/right to HWMv2. refactor(boards): Move Mikoto to HMWv2. Migrate Mikoto to HWMv2, with non-exact matching, tweaks to I2C selection to imply it for the 7.2.0 revision for the fuel gauge. refactor(boards): Move kbdfans Tofu65 2.0 to HMWv2 Move Tofu65 2.0 to HMWv2, with ID of just `tofu65`. refactor(boards): Remove dz60rgb board Remove dz60rgb, it's no longer readily available and we have other current stm32 reference designs for testing. refactor(boards): Move Corneish Zen to HMWv2 Move Corneish Zen to HMWv2, with IDs of `corneish_zen_left`/`corneish_zen_right`. refactor(boards): Migrate Corne-ish Zen status screen * refactor(boards): Add boot mode to the nice!nano using common dtsi * Add a new .dtsi for setting up nRF52 boot mode/retained memory settings * Adjust XIAO BLE to use the new include file * Add boot mode to to the nice!nano refactor(boards): Add boot mode support to nice!60 board Enable boot mode for nice!60 board. refactor(boards): Adjust Zephyr board metadata file locations Move the ZMK metadata files for upstream Zephyr boards to align with the HWMv2 directory structure that uses the vendor ID for the parent directory for a board directory. fix: Don't enable ZMK Display by default for a few shields By convention, avoid enabling ZMK Display by default on shields that may be built with under-resourced controllers (e.g. nRF52833 based ones). fix: Remove usage of renamed Kconfig from core coverage. Avoid using WS2812_LED_STRIP, since that Kconfig was renamed/split into SPI/GPIO/I2S symbols. refactor(boards): Adjust XIAO RP2040 override names, bootloader support Adjust the .conf/.overlay files to match the proper naming for the XIAO rp2040 board. Also add the necessary Kconfig/DTS bits for supporting bootloader using retained memory/boot mode retention. fix(display): Adjust stack sizes for display usage. Updated LVGL is bumping our stack size, so adjust the system work queue and dedicated display queue stack sizes as needed to account for this. feat(display): Add thread name to dedicated display queue. When thread names are enabled, pass a name to the dedicated display queue for better tracibility when using the thread analyzer. docs(blog): Add Zephyr upgrade post docs: Add bootloader integration page Add a dedicated page to outline steps to set up bootloader integration using the boot retention mechanism in newer Zephyr versions. fix(display): port nice!view display code * remove `lv_` prefix from old LVGL methods doc: Update local setup docs to use `west packages pip` Install Zephyr deps using the newer `west packages pip --install`. Signed-off-by: Peter Johanson <peter@peterjohanson.com> refactor(split): Adjust BT split code for newer Zephyr APIs. refactor(boards): Adjust upstream RP2040 boards for boot mode retention Add necessary DTS/Kconfig settings to upstream RP2040 boards so they can use the ZMK bootloader functionality using the boot mode retention infrastructure. docs: Update Zephyr docs links to 4.1.0 version. Update all links to the Zephyr docs to the 4.1.0 versions to match our Zephyr version in use. docs: Add a note about using CMake v3 for maximum compatibility. Some optional modules, like libmetal, which is used on nRF5340, specifically require CMake v3, so add a note in the native toolchain setup about this. feat(pointing): Handle INPUT_BTN_TOUCH codes for mouse buttons Translate INPUT_BTN_TOUCH input codes into button 0 press/release for HID layer. chore(pointing): Clean up some warning messages. Properly check return code from queue-ing messages, and fix up some type warnings in our logging calls. * Fix input event codes line numbers fix(studio): Properly serialize GATT RPC indications. fix(core): Set a system work queue stack size of 2048 by default We use a fair amount of stack even without BLE or RP2040, so default to 2048 by default everywhere, and constrained platforms can lowes this if they really need. refactor(core): Move away from deprecated DIS Kconfig symbols Use the correct Device Information Service Kconfig symbols for our model number and manufacturer. refactor: Move upstream Zephyr board overrides to extensions dirs Newer Zephyr supports "board extensions" to formally do what we've added in ourselves via some hacks, so move all our board overlay/config file overrides for upstream Zephyr boards into that correct structure. fix(boards): Add xiao_ble sd_partition label for nosd snippet compat Upstream xiao_ble uses different naming convention for the partition labels, so add an additional label for the SD range, so the existing nrf52840-nosd snippet will still work with the board. fix(core): Don't force CBPRINTF_NANO, for proper formatting. The nano CBPRINTF implementation lacks some padded formatting needed to ensure consistent formatting of BLE addresses, which we use to store keys as strings in a few places, so use the complete CBPRINTF by default now. fix(boards): Remove some references to old nice_nano_v2 board ID. The nice!nano board definition now properly uses versioning, so avoid referring to it with old `nice_nano_v2` board ID. fix(boards): Remove nano overlays for old nice_nano_v2 board ID. With board versioning in place, we can remove the unused `nice_nano_v2.overlay` files from shields. --------- Signed-off-by: Peter Johanson <peter@peterjohanson.com> Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com> Co-authored-by: Nicolas Munnich <munnich@lipn.univ-paris13.fr> Co-authored-by: snoyer <noyer.stephane@gmail.com>
716 lines
16 KiB
Plaintext
716 lines
16 KiB
Plaintext
# Copyright (c) 2020 The ZMK Contributors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
mainmenu "ZMK Firmware"
|
|
|
|
menu "ZMK"
|
|
|
|
menu "Basic Keyboard Setup"
|
|
|
|
config ZMK_KEYBOARD_NAME
|
|
string "Keyboard Name"
|
|
|
|
config USB_DEVICE_PRODUCT
|
|
default ZMK_KEYBOARD_NAME
|
|
|
|
config BT_DEVICE_NAME
|
|
default ZMK_KEYBOARD_NAME
|
|
|
|
config USB_DEVICE_VID
|
|
default 0x1D50
|
|
|
|
config USB_DEVICE_PID
|
|
default 0x615E
|
|
|
|
config USB_DEVICE_MANUFACTURER
|
|
default "ZMK Project"
|
|
|
|
config BT_DIS_PNP_VID
|
|
default 0x1D50
|
|
|
|
config BT_DIS_PNP_PID
|
|
default 0x615E
|
|
|
|
config BT_DIS_MODEL_NUMBER_STR
|
|
default ZMK_KEYBOARD_NAME
|
|
|
|
config BT_DIS_MANUF_NAME_STR
|
|
default "ZMK Project"
|
|
|
|
# Hardware specific overrides
|
|
|
|
if SOC_SERIES_NRF52X
|
|
|
|
# Default on for our usage until boards implement retained bootmode.
|
|
config NRF_STORE_REBOOT_TYPE_GPREGRET
|
|
bool
|
|
default y
|
|
|
|
endif # SOC_SERIES_NRF52X
|
|
|
|
menu "HID"
|
|
|
|
choice ZMK_HID_REPORT_TYPE
|
|
prompt "HID Report Type"
|
|
|
|
config ZMK_HID_REPORT_TYPE_HKRO
|
|
bool "#-Key Roll Over (HKRO) HID Report"
|
|
help
|
|
Enable # key roll over for HID report. This selection is "boot keyboard" compatible
|
|
but limits the total number of possible keys to report as held to #.
|
|
|
|
config ZMK_HID_REPORT_TYPE_NKRO
|
|
bool "Full N-Key Roll Over (NKRO) HID Report"
|
|
help
|
|
Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard
|
|
from working with some BIOS/UEFI versions that only support "boot keyboard" support.
|
|
This option also prevents using some infrequently used higher range HID usages (notably F13-F24 and INTL1-9)
|
|
These usages can be re enabled with ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT.
|
|
|
|
endchoice
|
|
|
|
config ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT
|
|
bool "Enable extended NKRO reporting"
|
|
depends on ZMK_HID_REPORT_TYPE_NKRO
|
|
help
|
|
Enables higher usage range for NKRO (F13-F24 and INTL1-9).
|
|
Please note this is not compatible with Android currently and you will get no input
|
|
|
|
|
|
if ZMK_HID_REPORT_TYPE_HKRO
|
|
|
|
config ZMK_HID_KEYBOARD_REPORT_SIZE
|
|
int "# Keyboard Keys Reportable"
|
|
|
|
endif # ZMK_HID_REPORT_TYPE_HKRO
|
|
|
|
config ZMK_HID_CONSUMER_REPORT_SIZE
|
|
int "# Consumer Keys Reportable"
|
|
|
|
choice ZMK_HID_CONSUMER_REPORT_USAGES
|
|
prompt "HID Report Type"
|
|
|
|
config ZMK_HID_CONSUMER_REPORT_USAGES_FULL
|
|
bool "Full Consumer HID Usage Support"
|
|
help
|
|
Enable full Consumer usage ID values to be sent to hosts. Allows for less
|
|
frequently used usages, but has compatibability issues with some host OSes.
|
|
|
|
config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC
|
|
bool "Basic Consumer HID Usage Support"
|
|
help
|
|
Enable Consumer usage ID values up to "Playback Speed - Slow" to be sent to
|
|
hosts. Allows for broader compatibability with more host OSes.
|
|
|
|
endchoice
|
|
|
|
config ZMK_HID_INDICATORS
|
|
bool "HID Indicators"
|
|
help
|
|
Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock,
|
|
Kata, and Compose.
|
|
|
|
config ZMK_HID_SEPARATE_MOD_RELEASE_REPORT
|
|
bool "Release Modifiers Separately"
|
|
help
|
|
Send a separate release event for the modifiers, to make sure the release
|
|
of the modifier doesn't get recognized before the actual key's release event.
|
|
|
|
menu "Output Types"
|
|
|
|
config ZMK_USB
|
|
bool "USB"
|
|
depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL))
|
|
select USB
|
|
select USB_DEVICE_STACK
|
|
select USB_DEVICE_HID
|
|
|
|
config ZMK_USB_BOOT
|
|
bool "USB Boot Protocol Support"
|
|
depends on ZMK_USB
|
|
select USB_HID_BOOT_PROTOCOL
|
|
select USB_DEVICE_SOF
|
|
|
|
config USB_DEVICE_INITIALIZE_AT_BOOT
|
|
default n
|
|
|
|
if ZMK_USB
|
|
|
|
config USB_NUMOF_EP_WRITE_RETRIES
|
|
default 10
|
|
|
|
config USB_HID_POLL_INTERVAL_MS
|
|
default 1
|
|
|
|
endif # ZMK_USB
|
|
|
|
menuconfig ZMK_BLE
|
|
bool "BLE (HID over GATT)"
|
|
select BT
|
|
select BT_SMP
|
|
select BT_SMP_SC_PAIR_ONLY
|
|
select BT_SMP_APP_PAIRING_ACCEPT
|
|
select BT_PERIPHERAL
|
|
select BT_DIS
|
|
imply BT_DEVICE_NAME_DYNAMIC
|
|
imply BT_SETTINGS if !ARCH_POSIX
|
|
imply SETTINGS if !ARCH_POSIX
|
|
imply ZMK_BATTERY_REPORTING if !ARCH_POSIX
|
|
|
|
if ZMK_BLE
|
|
|
|
config ZMK_BLE_EXPERIMENTAL_CONN
|
|
bool "Experimental BLE connection changes"
|
|
help
|
|
Enables settings that are planned to be default in future versions of ZMK
|
|
to improve connection stability.
|
|
|
|
config ZMK_BLE_EXPERIMENTAL_SEC
|
|
bool "Experimental BLE security changes"
|
|
imply BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
|
help
|
|
Enables security settings that are planned to be officially supported in the future.
|
|
|
|
config ZMK_BLE_EXPERIMENTAL_FEATURES
|
|
bool "Experimental BLE connection and security settings/features"
|
|
select ZMK_BLE_EXPERIMENTAL_CONN
|
|
select ZMK_BLE_EXPERIMENTAL_SEC
|
|
help
|
|
Enables experimental connection changes and security features.
|
|
|
|
config ZMK_BLE_PASSKEY_ENTRY
|
|
bool "Require passkey entry on the keyboard to complete pairing"
|
|
select RING_BUFFER
|
|
|
|
config BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
|
imply ZMK_BLE_PASSKEY_ENTRY
|
|
|
|
config BT_CTLR_PHY_2M
|
|
default n if ZMK_BLE_EXPERIMENTAL_CONN
|
|
|
|
config ZMK_BLE_THREAD_STACK_SIZE
|
|
int "BLE notify thread stack size"
|
|
default 768
|
|
|
|
config ZMK_BLE_THREAD_PRIORITY
|
|
int "BLE notify thread priority"
|
|
default 5
|
|
|
|
config ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE
|
|
int "Max number of keyboard HID reports to queue for sending over BLE"
|
|
default 20
|
|
|
|
config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE
|
|
int "Max number of consumer HID reports to queue for sending over BLE"
|
|
default 5
|
|
|
|
config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE
|
|
int "Max number of mouse HID reports to queue for sending over BLE"
|
|
default 20
|
|
|
|
config ZMK_BLE_CLEAR_BONDS_ON_START
|
|
bool "Configuration that clears all bond information from the keyboard on startup."
|
|
|
|
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
|
|
config BT_GATT_NOTIFY_MULTIPLE
|
|
default n
|
|
|
|
config BT_GATT_AUTO_SEC_REQ
|
|
default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL)
|
|
|
|
config BT_PERIPHERAL_PREF_MIN_INT
|
|
default 6
|
|
|
|
config BT_PERIPHERAL_PREF_MAX_INT
|
|
default 12
|
|
|
|
config BT_PERIPHERAL_PREF_LATENCY
|
|
default 30
|
|
|
|
config BT_PERIPHERAL_PREF_TIMEOUT
|
|
default 400
|
|
|
|
# The device name should be 16 characters or less so it fits within the
|
|
# advertising data.
|
|
config BT_DEVICE_NAME_MAX
|
|
default 16
|
|
|
|
endif # ZMK_BLE
|
|
|
|
endmenu # Output Types
|
|
|
|
endmenu # HID
|
|
|
|
rsource "src/split/Kconfig"
|
|
|
|
endmenu # Basic Keyboard Setup
|
|
|
|
menu "Keymaps"
|
|
|
|
config ZMK_KEYMAP_LAYER_REORDERING
|
|
bool "Layer Reordering Support"
|
|
|
|
config ZMK_KEYMAP_SETTINGS_STORAGE
|
|
bool "Settings Save/Load"
|
|
depends on SETTINGS
|
|
depends on ZMK_BEHAVIOR_LOCAL_IDS
|
|
|
|
if ZMK_KEYMAP_SETTINGS_STORAGE
|
|
|
|
config ZMK_KEYMAP_LAYER_NAME_MAX_LEN
|
|
int "Max Layer Name Length"
|
|
default 20
|
|
|
|
endif # ZMK_KEYMAP_SETTINGS_STORAGE
|
|
|
|
endmenu # Keymaps
|
|
|
|
rsource "src/studio/Kconfig"
|
|
|
|
menu "Display/LED Options"
|
|
|
|
rsource "src/display/Kconfig"
|
|
|
|
menuconfig ZMK_RGB_UNDERGLOW
|
|
bool "RGB Addressable LED Underglow"
|
|
select LED_STRIP
|
|
select ZMK_LOW_PRIORITY_WORK_QUEUE
|
|
|
|
if ZMK_RGB_UNDERGLOW
|
|
|
|
config ZMK_RGB_UNDERGLOW_EXT_POWER
|
|
bool "RGB underglow toggling also controls external power"
|
|
|
|
config ZMK_RGB_UNDERGLOW_BRT_MIN
|
|
int "RGB underglow minimum brightness in percent"
|
|
range 0 100
|
|
|
|
config ZMK_RGB_UNDERGLOW_BRT_MAX
|
|
int "RGB underglow maximum brightness in percent"
|
|
range ZMK_RGB_UNDERGLOW_BRT_MIN 100
|
|
|
|
config ZMK_RGB_UNDERGLOW_HUE_STEP
|
|
int "RGB underglow hue step in degrees"
|
|
range 0 359
|
|
|
|
config ZMK_RGB_UNDERGLOW_SAT_STEP
|
|
int "RGB underglow saturation step in percent"
|
|
range 0 100
|
|
|
|
config ZMK_RGB_UNDERGLOW_BRT_STEP
|
|
int "RGB underglow brightness step in percent"
|
|
range 0 100
|
|
|
|
config ZMK_RGB_UNDERGLOW_HUE_START
|
|
int "RGB underglow start hue value in degrees"
|
|
range 0 359
|
|
|
|
config ZMK_RGB_UNDERGLOW_SAT_START
|
|
int "RGB underglow start saturations value in percent"
|
|
range 0 100
|
|
|
|
config ZMK_RGB_UNDERGLOW_BRT_START
|
|
int "RGB underglow start brightness value in percent"
|
|
range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX
|
|
|
|
config ZMK_RGB_UNDERGLOW_SPD_START
|
|
int "RGB underglow start animation speed value"
|
|
range 1 5
|
|
|
|
config ZMK_RGB_UNDERGLOW_EFF_START
|
|
int "RGB underglow start effect int value related to the effect enum list"
|
|
range 0 3
|
|
|
|
config ZMK_RGB_UNDERGLOW_ON_START
|
|
bool "RGB underglow starts on by default"
|
|
|
|
config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE
|
|
bool "Turn off RGB underglow when keyboard goes into idle state"
|
|
|
|
config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB
|
|
bool "Turn off RGB underglow when USB is disconnected"
|
|
depends on USB_DEVICE_STACK
|
|
|
|
endif # ZMK_RGB_UNDERGLOW
|
|
|
|
menuconfig ZMK_BACKLIGHT
|
|
bool "LED backlight"
|
|
select LED
|
|
|
|
if ZMK_BACKLIGHT
|
|
|
|
config ZMK_BACKLIGHT_BRT_STEP
|
|
int "Brightness step in percent"
|
|
range 1 100
|
|
|
|
config ZMK_BACKLIGHT_BRT_START
|
|
int "Default brightness in percent"
|
|
range 1 100
|
|
|
|
config ZMK_BACKLIGHT_ON_START
|
|
bool "Default backlight state"
|
|
|
|
config ZMK_BACKLIGHT_AUTO_OFF_IDLE
|
|
bool "Turn off backlight when keyboard goes into idle state"
|
|
|
|
config ZMK_BACKLIGHT_AUTO_OFF_USB
|
|
bool "Turn off backlight when USB is disconnected"
|
|
|
|
endif # ZMK_BACKLIGHT
|
|
|
|
endmenu # Display/LED Options
|
|
|
|
rsource "src/pointing/Kconfig"
|
|
|
|
menu "Power Management"
|
|
|
|
config ZMK_BATTERY_REPORTING
|
|
bool "Battery level detection/reporting"
|
|
select SENSOR
|
|
select ZMK_LOW_PRIORITY_WORK_QUEUE
|
|
imply BT_BAS if ZMK_BLE
|
|
|
|
if ZMK_BATTERY_REPORTING
|
|
|
|
choice ZMK_BATTERY_REPORTING_FETCH_MODE
|
|
prompt "Battery Reporting Fetch Mode"
|
|
|
|
config ZMK_BATTERY_REPORTING_FETCH_MODE_STATE_OF_CHARGE
|
|
bool "State of charge"
|
|
|
|
config ZMK_BATTERY_REPORTING_FETCH_MODE_LITHIUM_VOLTAGE
|
|
bool "Lithium Voltage"
|
|
|
|
endchoice
|
|
|
|
endif # ZMK_BATTERY_REPORTING
|
|
|
|
config ZMK_IDLE_TIMEOUT
|
|
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
|
|
default 30000
|
|
|
|
config ZMK_SLEEP
|
|
bool "Enable deep sleep support"
|
|
depends on HAS_POWEROFF
|
|
select POWEROFF
|
|
select ZMK_PM_DEVICE_SUSPEND_RESUME
|
|
imply USB
|
|
|
|
if ZMK_SLEEP
|
|
|
|
config PM_DEVICE
|
|
default y
|
|
|
|
config ZMK_IDLE_SLEEP_TIMEOUT
|
|
int "Milliseconds of inactivity before entering deep sleep"
|
|
default 900000
|
|
|
|
endif # ZMK_SLEEP
|
|
|
|
config ZMK_EXT_POWER
|
|
bool "Enable support to control external power output"
|
|
|
|
config ZMK_PM
|
|
bool
|
|
|
|
config ZMK_PM_DEVICE_SUSPEND_RESUME
|
|
bool
|
|
select ZMK_PM
|
|
|
|
config ZMK_PM_SOFT_OFF
|
|
bool "Soft-off support"
|
|
depends on HAS_POWEROFF
|
|
select ZMK_PM
|
|
select PM_DEVICE
|
|
select ZMK_PM_DEVICE_SUSPEND_RESUME
|
|
select POWEROFF
|
|
|
|
config ZMK_GPIO_KEY_WAKEUP_TRIGGER
|
|
bool "Hardware supported wakeup (GPIO)"
|
|
default y
|
|
depends on DT_HAS_ZMK_GPIO_KEY_WAKEUP_TRIGGER_ENABLED && ZMK_PM_SOFT_OFF
|
|
|
|
# Power Management
|
|
endmenu
|
|
|
|
menu "Combo options"
|
|
|
|
config ZMK_COMBO_MAX_PRESSED_COMBOS
|
|
int "Maximum number of currently pressed combos"
|
|
default 4
|
|
|
|
config ZMK_COMBO_MAX_COMBOS_PER_KEY
|
|
int "Deprecated: Max combos per key"
|
|
default 0
|
|
help
|
|
Deprecated: Storage for combos is now determined automatically
|
|
|
|
config ZMK_COMBO_MAX_KEYS_PER_COMBO
|
|
int "Deprecated: Max keys per combo"
|
|
default 0
|
|
help
|
|
Deprecated: This is now auto-calculated based on `key-positions` in devicetree
|
|
|
|
# Combo options
|
|
endmenu
|
|
|
|
menu "Behavior Options"
|
|
|
|
config ZMK_BEHAVIORS_QUEUE_SIZE
|
|
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
|
default 64
|
|
|
|
rsource "Kconfig.behaviors"
|
|
|
|
config ZMK_MACRO_DEFAULT_WAIT_MS
|
|
int "Default time to wait (in milliseconds) before triggering the next behavior in macros"
|
|
default 15
|
|
|
|
config ZMK_MACRO_DEFAULT_TAP_MS
|
|
int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros"
|
|
default 30
|
|
|
|
endmenu
|
|
|
|
menu "Advanced"
|
|
|
|
rsource "src/boot/Kconfig"
|
|
|
|
menu "Initialization Priorities"
|
|
|
|
if USB_DEVICE_STACK
|
|
|
|
config ZMK_USB_INIT_PRIORITY
|
|
int "USB Init Priority"
|
|
default 96
|
|
|
|
config ZMK_USB_HID_INIT_PRIORITY
|
|
int "USB HID Init Priority"
|
|
default 95
|
|
|
|
endif # USB
|
|
|
|
if ZMK_BLE || ZMK_SPLIT_BLE
|
|
|
|
config ZMK_BLE_INIT_PRIORITY
|
|
int "BLE Init Priority"
|
|
default 50
|
|
|
|
endif # ZMK_BLE || ZMK_SPLIT_BLE
|
|
|
|
endmenu # Initialization Priorities
|
|
|
|
config ZMK_PHYSICAL_LAYOUT_KEY_ROTATION
|
|
bool "Support rotation of keys in physical layouts"
|
|
default y
|
|
|
|
menuconfig ZMK_KSCAN
|
|
bool "ZMK KScan Integration"
|
|
default y
|
|
select KSCAN
|
|
|
|
if ZMK_KSCAN
|
|
|
|
config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
|
int "Size of the event queue for KSCAN events to buffer events"
|
|
default 4
|
|
|
|
endif # ZMK_KSCAN
|
|
|
|
config ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
|
bool
|
|
default y
|
|
depends on DT_HAS_ZMK_KSCAN_SIDEBAND_BEHAVIORS_ENABLED
|
|
select KSCAN
|
|
|
|
if ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
|
|
|
config ZMK_KSCAN_SIDEBAND_BEHAVIORS_INIT_PRIORITY
|
|
int "Keyboard scan sideband behaviors driver init priority"
|
|
# The default kscan init priority is 90, so be sure we are initialized later.
|
|
default 95
|
|
|
|
endif # ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
|
|
|
menu "Logging"
|
|
|
|
config ZMK_LOGGING_MINIMAL
|
|
bool "Suppress all ZMK debug log messages"
|
|
default false
|
|
|
|
if !ZMK_LOGGING_MINIMAL
|
|
|
|
config ZMK_LOG_LEVEL
|
|
default 4
|
|
|
|
endif
|
|
|
|
config ZMK_USB_LOGGING
|
|
bool "Enable USB CDC ACM logging to help debug"
|
|
select LOG
|
|
select USB
|
|
select USB_DEVICE_STACK
|
|
select USB_CDC_ACM
|
|
select SERIAL
|
|
select CONSOLE
|
|
select UART_INTERRUPT_DRIVEN
|
|
select UART_LINE_CTRL
|
|
select UART_CONSOLE
|
|
select USB_UART_CONSOLE
|
|
|
|
if ZMK_USB_LOGGING
|
|
|
|
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
|
|
default USB_CDC_ACM_LOG_LEVEL_OFF
|
|
endchoice
|
|
|
|
choice USB_DRIVER_LOG_LEVEL_CHOICE
|
|
default USB_DRIVER_LOG_LEVEL_OFF
|
|
endchoice
|
|
|
|
# We do this to avoid log loop where logging to USB generates more log messages.
|
|
|
|
config USB_CDC_ACM_RINGBUF_SIZE
|
|
default 1024
|
|
|
|
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
|
|
default 1000
|
|
|
|
endif # ZMK_USB_LOGGING
|
|
|
|
config ZMK_RTT_LOGGING
|
|
bool "Enable RTT logging to help debug"
|
|
select LOG
|
|
select DEBUG
|
|
select ASSERT
|
|
select USE_SEGGER_RTT
|
|
select CONSOLE
|
|
select RTT_CONSOLE
|
|
|
|
if ZMK_RTT_LOGGING
|
|
|
|
config SEGGER_RTT_BUFFER_SIZE_UP
|
|
default 8192
|
|
|
|
endif # ZMK_RTT_LOGGING
|
|
|
|
if ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
|
|
|
config LOG_BUFFER_SIZE
|
|
default 8192
|
|
|
|
config LOG_PROCESS_THREAD_SLEEP_MS
|
|
default 100
|
|
|
|
endif # ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
|
|
|
endmenu # Logging
|
|
|
|
if SETTINGS
|
|
|
|
config ZMK_SETTINGS_RESET_ON_START
|
|
bool "Delete all persistent settings when the keyboard boots"
|
|
|
|
if ZMK_SETTINGS_RESET_ON_START
|
|
|
|
config ZMK_SETTINGS_RESET_ON_START_INIT_PRIORITY
|
|
int "Settings Reset ON Start Initialization Priority"
|
|
default 60
|
|
help
|
|
Initialization priority for the settings reset on start. Must be lower priority/
|
|
higher value than FLASH_INIT_PRIORITY if using the NVS/Flash settings backend.
|
|
|
|
endif # ZMK_SETTINGS_RESET_ON_START
|
|
|
|
config ZMK_SETTINGS_SAVE_DEBOUNCE
|
|
int "Milliseconds to debounce settings saves"
|
|
default 60000
|
|
|
|
endif # SETTINGS
|
|
|
|
config ZMK_BATTERY_REPORT_INTERVAL
|
|
depends on ZMK_BATTERY_REPORTING
|
|
int "Battery level report interval in seconds"
|
|
|
|
config ZMK_LOW_PRIORITY_WORK_QUEUE
|
|
bool "Work queue for low priority items"
|
|
|
|
if ZMK_LOW_PRIORITY_WORK_QUEUE
|
|
|
|
config ZMK_LOW_PRIORITY_THREAD_STACK_SIZE
|
|
int "Low priority thread stack size"
|
|
default 768
|
|
|
|
config ZMK_LOW_PRIORITY_THREAD_PRIORITY
|
|
int "Low priority thread priority"
|
|
default 10
|
|
|
|
endif # ZMK_LOW_PRIORITY_WORK_QUEUE
|
|
|
|
endmenu # Advanced
|
|
|
|
endmenu # ZMK
|
|
|
|
if SOC_FAMILY_NORDIC_NRF
|
|
|
|
config NRF_SOC_VALIDATE_HEADERS_DISABLED
|
|
default y
|
|
|
|
endif
|
|
|
|
config KERNEL_BIN_NAME
|
|
default "zmk"
|
|
|
|
config REBOOT
|
|
default y
|
|
|
|
config USB_DEVICE_STACK
|
|
default y if HAS_HW_NRF_USBD
|
|
|
|
config FPU
|
|
default CPU_HAS_FPU
|
|
|
|
config ZMK_WPM
|
|
bool "Calculate WPM"
|
|
|
|
config ZMK_KEYMAP_SENSORS
|
|
bool "Enable Keymap Sensors support"
|
|
default y
|
|
depends on DT_HAS_ZMK_KEYMAP_SENSORS_ENABLED
|
|
select SENSOR
|
|
|
|
if ZMK_KEYMAP_SENSORS
|
|
|
|
config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION
|
|
int "Default triggers per rotation"
|
|
help
|
|
Unless overridden for a sensor in the board/shield/devicetree, this value
|
|
determines how many times to trigger the bound behavior per full rotation.
|
|
For tactile encoders with detents, this usually should match the number of
|
|
detents per rotation of the encoder.
|
|
default 20
|
|
|
|
endif # ZMK_KEYMAP_SENSORS
|
|
|
|
module = ZMK
|
|
module-str = zmk
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
# This loads ZMK's internal board and shield Kconfigs
|
|
rsource "boards/Kconfig"
|
|
rsource "boards/shields/*/Kconfig.defconfig"
|
|
rsource "boards/shields/*/Kconfig.shield"
|
|
|
|
# This loads custom shields defconfigs (from BOARD_ROOT)
|
|
# Duplicated from Kconfig.zephyr
|
|
osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig"
|
|
|
|
# This loads board and shield Kconfigs found under zmk-config/config/
|
|
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig"
|
|
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
|
|
|
|
# This loads ZMK's sensible defaults
|
|
rsource "Kconfig.defaults"
|
|
|
|
source "Kconfig.zephyr"
|