fix(bluetooth): add passkey/PIN display dialogs for keyboard pairing

Bluetooth keyboards require the host to display a passkey for the user
to type. Previously this was not supported because the agent capability
was set to DisplayYesNo and the DisplayPasskey/DisplayPinCode events
were not handled.

- Change agent capability to KeyboardDisplay
- Add DisplayPasskey dialog with typed-key progress indicator
- Add DisplayPinCode dialog for older keyboards
- Auto-dismiss display dialogs when device reports Paired=true
This commit is contained in:
Steven Ceuppens 2026-06-03 15:24:04 -06:00 committed by GitHub
parent de5e16d360
commit 989a56346a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 146 additions and 197 deletions

View file

@ -40,7 +40,7 @@ pub async fn watch(
bluez
.register_agent(
&agent_path,
<&'static str>::from(bluez_zbus::agent1::Capability::DisplayYesNo),
<&'static str>::from(bluez_zbus::agent1::Capability::KeyboardDisplay),
)
.await?;