Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
JavaScript Suite Documentation
KeyboardListener

KeyboardListener Class Reference

Constructors

Instance Methods

Constructors

new KeyboardListener()

Initializes an instance of KeyboardListener.

Instance Methods

keyboardListener.onKeyboardDidAbortWithReason(event)

Safely attempts to invoke the onKeyboardDidAbortWithReason event. The keyboard session aborted. This will be sent if the keyboard event ENTRY_CANCELLED or ENTRY_ABORTED is sent

Kind: Instance method of KeyboardListener

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

keyboardListener.onKeyboardDidSendEvent(event, currentInputText)

Safely attempts to invoke the onKeyboardDidSendEvent event. Implement this to be notified of all events occurring on the keyboard

Kind: Instance method of KeyboardListener

ParamTypeDescription
event KeyboardEvent The event that occurred
currentInputText String The event that occurred

keyboardListener.onKeyboardDidUpdateInputMask(event)

Safely attempts to invoke the onKeyboardDidUpdateInputMask event. Implement this to be notified of all events occurring on the keyboard

Kind: Instance method of KeyboardListener

ParamTypeDescription
event KeyboardEvent The event that occurred

keyboardListener.onUserDidSubmitInput(inputText, event)

Safely attempts to invoke the onUserDidSubmitInput event. 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.

Kind: Instance method of KeyboardListener

ParamTypeDescription
inputText String The submitted input text on the keyboard
event KeyboardEvent ENTRY_SUBMITTED if the user pressed the submit button on the keyboard, ENTRY_VOICE if the user requested that a voice session begin

keyboardListener.setOnKeyboardDidAbortWithReason(listener) ⇒ KeyboardListener

Set the onKeyboardDidAbortWithReason function.

Kind: Instance method of KeyboardListener
Returns: KeyboardListener - A reference to this instance to allow method chaining.

ParamTypeDescription
listener function A function to be invoked when the event occurs.

keyboardListener.setOnKeyboardDidSendEvent(listener) ⇒ KeyboardListener

Set the onKeyboardDidSendEvent function.

Kind: Instance method of KeyboardListener
Returns: KeyboardListener - A reference to this instance to allow method chaining.

ParamTypeDescription
listener function A function to be invoked when the event occurs.

keyboardListener.setOnKeyboardDidUpdateInputMask(listener) ⇒ KeyboardListener

Set the onKeyboardDidUpdateInputMask function.

Kind: Instance method of KeyboardListener
Returns: KeyboardListener - A reference to this instance to allow method chaining.

ParamTypeDescription
listener function A function to be invoked when the event occurs.

keyboardListener.setOnUserDidSubmitInput(listener) ⇒ KeyboardListener

Set the onUserDidSubmitInput function.

Kind: Instance method of KeyboardListener
Returns: KeyboardListener - A reference to this instance to allow method chaining.

ParamTypeDescription
listener function A function to be invoked when the event occurs.

keyboardListener.setUpdateAutocompleteWithInput(listener) ⇒ KeyboardListener

Set the updateAutocompleteWithInput function.

Kind: Instance method of KeyboardListener
Returns: KeyboardListener - A reference to this instance to allow method chaining.

ParamTypeDescription
listener function A function to be invoked when the event occurs.

keyboardListener.setUpdateCharacterSetWithInput(listener) ⇒ KeyboardListener

Set the updateCharacterSetWithInput function.

Kind: Instance method of KeyboardListener
Returns: KeyboardListener - A reference to this instance to allow method chaining.

ParamTypeDescription
listener function A function to be invoked when the event occurs.

keyboardListener.updateAutocompleteWithInput(currentInputText, keyboardAutocompleteCompletionListener)

Safely attempts to invoke the updateAutocompleteWithInput event. Implement this in order to provide a custom keyboard configuration to just this keyboard. To apply default settings to all keyboards, see SDLScreenManager.keyboardConfiguration

Kind: Instance method of KeyboardListener

ParamTypeDescription
currentInputText String The user's full current input text
keyboardAutocompleteCompletionListener function A listener to update the autoCompleteText

keyboardListener.updateCharacterSetWithInput(currentInputText, keyboardCharacterSetCompletionListener)

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

Kind: Instance method of KeyboardListener

ParamTypeDescription
currentInputText String The user's full current input text
keyboardCharacterSetCompletionListener function A listener to update the limitedCharacterSet
View on GitHub.com
Previous Section Next Section