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.
Rewrote the macros for changing advertising state to be functions. This
makes it significantly easier to debug, since you cannot set a
breakpoint on a line inside of a macro.
* Capture the last 6 entered digits, and then require pressing
Enter/Return to submit the entered digits. This matches the
messaging shown on hosts regarding how to complete pairing.
* Fix the wording on the Kconfig menu item to accurately describe
the feature.
* Make it easier to use *just* event payloads by defining the data,
and then having event manager macros generate "wrapper structs"
* Improve is_*/cast_* APIs to hide details of full event struct.
* Create `zmk_event_t` typedef to pass to event handlers.
* Bring event names inline w/ consistent `zmk_` prefix.
Aligns *.h and *.c to underscore naming convention.
These were kept (with warnings) for backwards compatibility with external boards/shields:
- kscan-mock.h
- matrix-transform.h
They should be removed in the future.
PR: #523
Silences the following build warning ...
../src/ble.c:407:13: warning: 'auth_passkey_display' defined but not used [-Wunused-function]
407 | static void auth_passkey_display(struct bt_conn *conn, unsigned int passkey) {
Added zmk_ble_active_profile_is_connected() to allow code outside ble.c to check
the status of the active profile, and changed the ble_active_profile_changed
event to also notify when the active profile connects or disconnects.
Changed endpoint selection to to also update when the active profile changes,
connects, or disconnects.
* Add back in profiles, not using Zephyr
BT identity infrastructure.
* Restore additional `&bt` commands for profile
operations.
* Fix for split pairing and subscriptions, since
Zephyr persists subscriptions across connects.
* Remove keymap from peripheral builds, reduces
firmware size, and avoids unneeded attempts
to send HID data.
* Simplify the `bt` behavior to one current command
`BT_CLEAR_BONDS_CMD`.
* Simplify BLE code for split and non-split keyboards.
* Remove keymap processing from split peripheral side.
* Add `bt` behavior that can be used to perform certain actions,
such as next/prev identity, reset identity, etc.
NOTE: Multiple identities is only supported for non-split shields,
due to missing Zephyr identity functionality for dual
central/peripheral devices.
* Proper bond reset tied to action, that honors peripheral bonds,
so folks can reset and pair to other hosts, without breaking
bonds between splt halves.