zmk/app/Kconfig

568 lines
12 KiB
Plaintext
Raw Normal View History

2020-11-18 14:15:00 -08:00
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
mainmenu "ZMK Firmware"
2020-10-11 17:36:32 -07:00
menu "ZMK"
menu "Basic Keyboard Setup"
2020-05-28 21:15:57 -07:00
config ZMK_KEYBOARD_NAME
string "Keyboard Name"
2020-05-28 21:15:57 -07:00
config USB_DEVICE_PRODUCT
default ZMK_KEYBOARD_NAME
2020-05-28 21:15:57 -07:00
config BT_DEVICE_NAME
default ZMK_KEYBOARD_NAME
2020-05-28 21:15:57 -07:00
2020-10-20 19:47:49 -07:00
config USB_DEVICE_VID
default 0x1D50
2020-10-20 19:47:49 -07:00
config USB_DEVICE_PID
default 0x615E
2020-10-20 19:47:49 -07:00
config USB_DEVICE_MANUFACTURER
default "ZMK Project"
2020-10-20 19:47:49 -07:00
config BT_DIS_PNP_VID
default 0x1D50
config BT_DIS_PNP_PID
default 0x615E
config BT_DIS_MODEL
default ZMK_KEYBOARD_NAME
config BT_DIS_MANUF
default "ZMK Project"
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.
endchoice
if ZMK_HID_REPORT_TYPE_HKRO
config ZMK_HID_KEYBOARD_REPORT_SIZE
int "# Keyboard Keys Reportable"
default 6
endif
config ZMK_HID_CONSUMER_REPORT_SIZE
int "# Consumer Keys Reportable"
default 6
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
menu "Output Types"
2020-05-28 21:15:57 -07:00
config ZMK_USB
bool "USB"
select USB
select USB_DEVICE_STACK
select USB_DEVICE_HID
2020-05-28 21:15:57 -07:00
2020-10-31 05:24:38 -07:00
if ZMK_USB
2020-07-07 07:20:23 -07:00
2020-07-14 07:12:25 -07:00
config USB_NUMOF_EP_WRITE_RETRIES
default 10
2020-07-14 07:12:25 -07:00
config USB_HID_POLL_INTERVAL_MS
default 1
2020-10-31 05:24:38 -07:00
#ZMK_USB
2020-07-07 07:20:23 -07:00
endif
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
select BT_BAS
select BT_SETTINGS
select SETTINGS
if ZMK_BLE
# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
config BT_TINYCRYPT_ECC
default y if BT_HCI && !BT_CTLR
choice BT_LL_SW_LLCP_IMPL
default BT_LL_SW_LLCP_LEGACY
endchoice
2020-07-16 12:50:41 -07:00
config SYSTEM_WORKQUEUE_STACK_SIZE
default 4096 if SOC_RP2040
default 2048
2020-07-16 12:50:41 -07:00
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_CLEAR_BONDS_ON_START
bool "Configuration that clears all bond information from the keyboard on startup."
default n
2020-05-28 21:15:57 -07:00
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
config BT_GATT_NOTIFY_MULTIPLE
default n
2020-05-28 21:15:57 -07:00
config BT_GATT_AUTO_SEC_REQ
default n
2020-05-28 21:15:57 -07:00
config BT_DEVICE_APPEARANCE
default 961
2020-05-28 21:15:57 -07:00
config ZMK_BLE_PASSKEY_ENTRY
bool "Require passkey entry on the keyboard to complete pairing"
default n
select RING_BUFFER
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
2020-10-11 17:36:32 -07:00
#ZMK_BLE
endif
#Output Types
endmenu
# HID
2020-05-28 21:15:57 -07:00
endmenu
rsource "src/split/Kconfig"
#Basic Keyboard Setup
2020-10-11 17:36:32 -07:00
endmenu
menu "Encoders"
config ZMK_ENCODERS_DEFAULT_TRIGGERS_PER_ROTATION
int "Default behavior triggers per rotation"
help
Unless overridden for a specific behavior in the keymap/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 30
endmenu
2020-10-11 17:36:32 -07:00
menu "Display/LED Options"
rsource "src/display/Kconfig"
2021-10-09 09:24:37 -07:00
menuconfig ZMK_RGB_UNDERGLOW
bool "RGB Adressable LED Underglow"
select LED_STRIP
if ZMK_RGB_UNDERGLOW
2020-10-20 19:47:49 -07:00
# This default value cuts down on tons of excess .conf files, if you're using GPIO, manually disable this
config SPI
default y
2020-10-20 19:47:49 -07:00
config ZMK_RGB_UNDERGLOW_EXT_POWER
bool "RGB underglow toggling also controls external power"
default y
config ZMK_RGB_UNDERGLOW_BRT_MIN
int "RGB underglow minimum brightness in percent"
range 0 100
default 0
config ZMK_RGB_UNDERGLOW_BRT_MAX
int "RGB underglow maximum brightness in percent"
range ZMK_RGB_UNDERGLOW_BRT_MIN 100
default 100
config ZMK_RGB_UNDERGLOW_HUE_STEP
int "RGB underglow hue step in degrees"
range 0 359
default 10
config ZMK_RGB_UNDERGLOW_SAT_STEP
int "RGB underglow saturation step in percent"
range 0 100
default 10
config ZMK_RGB_UNDERGLOW_BRT_STEP
int "RGB underglow brightness step in percent"
range 0 100
default 10
2020-10-20 19:47:49 -07:00
config ZMK_RGB_UNDERGLOW_HUE_START
int "RGB underglow start hue value in degrees"
range 0 359
default 0
2020-10-20 19:47:49 -07:00
config ZMK_RGB_UNDERGLOW_SAT_START
int "RGB underglow start saturations value in percent"
range 0 100
default 100
2020-10-20 19:47:49 -07:00
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
default ZMK_RGB_UNDERGLOW_BRT_MAX
2020-10-20 19:47:49 -07:00
config ZMK_RGB_UNDERGLOW_SPD_START
int "RGB underglow start animation speed value"
range 1 5
default 3
2020-10-20 19:47:49 -07:00
config ZMK_RGB_UNDERGLOW_EFF_START
int "RGB underglow start effect int value related to the effect enum list"
range 0 3
default 0
2020-10-20 19:47:49 -07:00
config ZMK_RGB_UNDERGLOW_ON_START
bool "RGB underglow starts on by default"
default y
2020-10-20 19:47:49 -07:00
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
#ZMK_RGB_UNDERGLOW
endif
2021-10-09 09:24:37 -07:00
menuconfig ZMK_BACKLIGHT
bool "LED backlight"
select LED
2021-10-09 09:24:37 -07:00
if ZMK_BACKLIGHT
config ZMK_BACKLIGHT_BRT_STEP
int "Brightness step in percent"
range 1 100
default 20
2021-10-09 09:24:37 -07:00
config ZMK_BACKLIGHT_BRT_START
int "Default brightness in percent"
range 1 100
default 40
2021-10-09 09:24:37 -07:00
config ZMK_BACKLIGHT_ON_START
bool "Default backlight state"
default y
2021-10-09 09:24:37 -07:00
config ZMK_BACKLIGHT_AUTO_OFF_IDLE
bool "Turn off backlight when keyboard goes into idle state"
2021-10-09 09:24:37 -07:00
config ZMK_BACKLIGHT_AUTO_OFF_USB
bool "Turn off backlight when USB is disconnected"
2021-10-09 09:24:37 -07:00
#ZMK_BACKLIGHT
endif
#Display/LED Options
2020-10-11 17:36:32 -07:00
endmenu
menu "Power Management"
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"
imply USB
2020-10-11 17:36:32 -07:00
if ZMK_SLEEP
config PM_DEVICE
default y
2020-10-11 17:36:32 -07:00
config ZMK_IDLE_SLEEP_TIMEOUT
int "Milliseconds of inactivity before entering deep sleep"
default 900000
2020-10-11 17:36:32 -07:00
#ZMK_SLEEP
endif
config ZMK_EXT_POWER
bool "Enable support to control external power output"
default y
2020-10-11 17:36:32 -07:00
#Power Management
2020-10-11 17:36:32 -07:00
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 "Maximum number of combos per key"
default 5
config ZMK_COMBO_MAX_KEYS_PER_COMBO
int "Maximum number of keys per combo"
default 4
2021-10-09 09:24:37 -07:00
#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"
2022-04-29 11:31:21 -07:00
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"
menu "Initialization Priorities"
if USB_DEVICE_STACK
config ZMK_USB_INIT_PRIORITY
int "USB Init Priority"
default 50
#USB
endif
if ZMK_BLE || ZMK_SPLIT_BLE
config ZMK_BLE_INIT_PRIORITY
int "BLE Init Priority"
default 50
#ZMK_BLE || ZMK_SPLIT_BLE
endif
#Initialization Priorities
endmenu
menu "KSCAN Settings"
2020-10-11 17:36:32 -07:00
config ZMK_KSCAN_EVENT_QUEUE_SIZE
int "Size of the event queue for KSCAN events to buffer events"
default 4
2020-10-11 17:36:32 -07:00
#KSCAN Settings
endmenu
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
#ZMK_USB_LOGGING
endif
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
#ZMK_RTT_LOGGING
endif
if ZMK_USB_LOGGING || ZMK_RTT_LOGGING
config LOG_BUFFER_SIZE
default 8192
2023-02-24 15:16:18 -08:00
config LOG_PROCESS_THREAD_SLEEP_MS
default 100
2023-02-24 15:16:18 -08:00
#ZMK_USB_LOGGING || ZMK_RTT_LOGGING
endif
#Logging
endmenu
if SETTINGS
config ZMK_SETTINGS_SAVE_DEBOUNCE
int "Milliseconds to debounce settings saves"
default 60000
#SETTINGS
endif
config ZMK_BATTERY_REPORT_INTERVAL
depends on ZMK_BLE
int "Battery level report interval in seconds"
default 60
#Advanced
2020-10-11 17:36:32 -07:00
endmenu
#ZMK
endmenu
config HEAP_MEM_POOL_SIZE
default 8192
config KERNEL_BIN_NAME
default "zmk"
config REBOOT
default y
config USB_DEVICE_STACK
default y if HAS_HW_NRF_USBD
config ZMK_WPM
bool "Calculate WPM"
default n
config ZMK_KEYMAP_SENSORS
bool "Enable Keymap Sensors support"
default y
depends on DT_HAS_ZMK_KEYMAP_SENSORS_ENABLED
select SENSOR
2021-02-04 09:14:14 -08:00
if ZMK_KEYMAP_SENSORS
config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION
int "Default triggers per rotation"
default 20
endif # ZMK_KEYMAP_SENSORS
choice CBPRINTF_IMPLEMENTATION
default CBPRINTF_NANO
endchoice
module = ZMK
module-str = zmk
source "subsys/logging/Kconfig.template.log_config"
rsource "boards/Kconfig"
rsource "boards/shields/*/Kconfig.defconfig"
rsource "boards/shields/*/Kconfig.shield"
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig"
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
source "Kconfig.zephyr"