UserKeySelector

public protocol UserKeySelector : Sendable

A protocol for collecting user key selection when multiple keys are available. Conforming types can provide custom UI for selecting from multiple bound device keys.

  • Prompts the user to select a key from the available options.

    Declaration

    Swift

    func selectKey(userKeys: [UserKey], prompt: Prompt) async -> UserKey?

    Parameters

    userKeys

    An array of available user keys to choose from.

    prompt

    The prompt information to display to the user.

    Return Value

    The selected UserKey, or nil if the user cancels.