Added support for passkey display and passkey confirmation when pairing. Passkey display is enabled automatically when a display is enabled. Passkey confirm can be manually enabled if the keyboard has an Enter key. Updated the passkey entry code to require all 6 digits have been entered before confirming and to support backspace to remove a digit. Added a pairing screen for displays and refactored the display code to allow for switching between multiple screens. The screens are now initialized immediately instead of on the display work queue, because widgets will read state from other files when they are initialized, and this can only be done safely from the system queue. Blank on idle and theme initialization are pulled out to separate files to simplify the main file. The pairing screen supports all three passkey modes: - Passkey display just shows the passkey. - Passkey confirm shows the passkey and an icon indicating that you must press Enter to confirm. - Passkey entry shows the current passkey entry state and shows an icon indicating that you must press Enter to confirm once all 6 digits have been entered. (If passkey display or confirm are supported, it seems that Windows will always choose those over passkey entry, but the pairing screen still supports this in case other OSes work differently.) Added configs for normal and large font sizes. The large font is used for the passkey on the pairing screen on larger displays. CONFIG_LV_FONT_DEFAULT is no longer used for the normal font size, because setting a default value for it in display/Kconfig prevented display shields from picking a more appropriate default.
61 lines
1.3 KiB
Text
61 lines
1.3 KiB
Text
# Copyright (c) 2023 The ZMK Contributors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
if SHIELD_NICE_VIEW
|
|
|
|
config LV_Z_VDB_SIZE
|
|
default 100
|
|
|
|
config LV_Z_DPI
|
|
default 161
|
|
|
|
config LV_Z_BITS_PER_PIXEL
|
|
default 1
|
|
|
|
choice LV_COLOR_DEPTH
|
|
default LV_COLOR_DEPTH_1
|
|
endchoice
|
|
|
|
choice ZMK_DISPLAY_WORK_QUEUE
|
|
default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
|
|
endchoice
|
|
|
|
choice ZMK_DISPLAY_STATUS_SCREEN
|
|
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
|
endchoice
|
|
|
|
choice ZMK_LV_FONT_DEFAULT_SMALL
|
|
default ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16
|
|
endchoice
|
|
|
|
choice ZMK_LV_FONT_DEFAULT_NORMAL
|
|
default ZMK_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_22
|
|
endchoice
|
|
|
|
choice ZMK_LV_FONT_DEFAULT_LARGE
|
|
default ZMK_LV_FONT_DEFAULT_LARGE_MONTSERRAT_28
|
|
endchoice
|
|
|
|
config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
|
imply NICE_VIEW_WIDGET_STATUS
|
|
|
|
config NICE_VIEW_WIDGET_STATUS
|
|
bool "Custom nice!view status widget"
|
|
select LV_FONT_MONTSERRAT_16
|
|
select LV_USE_IMG
|
|
select LV_USE_CANVAS
|
|
|
|
config NICE_VIEW_WIDGET_INVERTED
|
|
bool "Invert custom status widget colors"
|
|
|
|
if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL
|
|
|
|
config NICE_VIEW_WIDGET_STATUS
|
|
select LV_FONT_MONTSERRAT_18
|
|
select LV_FONT_MONTSERRAT_14
|
|
select LV_FONT_UNSCII_8
|
|
select ZMK_WPM
|
|
|
|
endif # !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL
|
|
|
|
endif # SHIELD_NICE_VIEW
|