Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLKeyboardDelegate Protocol Reference

Section Contents

Overview

Undocumented

-userDidSubmitInput:withEvent:

The keyboard session completed with some input.

This will be sent upon ENTRY_SUBMITTED or ENTRY_VOICE. If the event is ENTRY_VOICE, the user requested to start a voice session in order to submit input to this keyboard. This MUST be handled by you. Start an Audio Pass Thru session if supported.

Objective-C

- (void)userDidSubmitInput:(nonnull NSString *)inputText
                 withEvent:(nonnull SDLKeyboardEvent)source;

Swift

func userDidSubmitInput(_ inputText: String, withEvent source: SDLKeyboardEvent)

Parameters

inputText

The submitted input text on the keyboard

source

ENTRY_SUBMITTED if the user pressed the submit button on the keyboard, ENTRY_VOICE if the user requested that a voice session begin

-keyboardDidAbortWithReason:

The keyboard session aborted.

This will be sent if the keyboard event ENTRY_CANCELLED or ENTRY_ABORTED is sent

Objective-C

- (void)keyboardDidAbortWithReason:(nonnull SDLKeyboardEvent)event;

Swift

func keyboardDidAbort(withReason event: SDLKeyboardEvent)

Parameters

event

ENTRY_CANCELLED if the user cancelled the keyboard input, or ENTRY_ABORTED if the system aborted the input due to a higher priority event

-customKeyboardConfiguration

Implement this in order to provide a custom keyboard configuration to just this keyboard. To apply default settings to all keyboards, see SDLScreenManager.keyboardConfiguration

Objective-C

- (nonnull SDLKeyboardProperties *)customKeyboardConfiguration;

Swift

optional func customKeyboardConfiguration() -> SDLKeyboardProperties

Return Value

The custom keyboard configuration to use.

-updateAutocompleteWithInput:completionHandler:

Implement this if you wish to update the KeyboardProperties.autoCompleteText as the user updates their input. This is called upon a KEYPRESS event.

Objective-C

- (void)updateAutocompleteWithInput:(nonnull NSString *)currentInputText
                  completionHandler:
                      (nonnull SDLKeyboardAutocompleteCompletionHandler)
                          completionHandler;

Swift

optional func updateAutocomplete(withInput currentInputText: String, completionHandler: @escaping SDLKeyboardAutocompleteCompletionHandler)

Parameters

currentInputText

The user’s full current input text

completionHandler

A completion handler to update the autoCompleteText

-updateCharacterSetWithInput:completionHandler:

Implement this if you wish to update the limitedCharacterSet as the user updates their input. This is called upon a KEYPRESS event.

Objective-C

- (void)updateCharacterSetWithInput:(nonnull NSString *)currentInputText
                  completionHandler:
                      (nonnull SDLKeyboardCharacterSetCompletionHandler)
                          completionHandler;

Swift

optional func updateCharacterSet(withInput currentInputText: String, completionHandler: @escaping SDLKeyboardCharacterSetCompletionHandler)

Parameters

currentInputText

The user’s full current input text

completionHandler

A completion handler to update the limitedCharacterSet

-keyboardDidSendEvent:text:

Implement this to be notified of all events occurring on the keyboard

Objective-C

- (void)keyboardDidSendEvent:(nonnull SDLKeyboardEvent)event
                        text:(nonnull NSString *)currentInputText;

Swift

optional func keyboardDidSendEvent(_ event: SDLKeyboardEvent, text currentInputText: String)

Parameters

event

The event that occurred

currentInputText

The user’s full current input text

View on GitHub.com
Previous Section Next Section