SDLKeyboardProperties Class Reference

Section Contents

Overview

Configuration of on-screen keyboard (if available)

-initWithLanguage:layout:keypressMode:limitedCharacterList:autoCompleteText:autoCompleteList:

Create a Keyboard Properties RPC object

Objective-C

- (nonnull instancetype)
        initWithLanguage:(nullable SDLLanguage)language
                  layout:(nullable SDLKeyboardLayout)layout
            keypressMode:(nullable SDLKeypressMode)keypressMode
    limitedCharacterList:(nullable NSArray<NSString *> *)limitedCharacterList
        autoCompleteText:(nullable NSString *)autoCompleteText
        autoCompleteList:(nullable NSArray<NSString *> *)autoCompleteList;

Swift

init(language: SDLLanguage?, layout: SDLKeyboardLayout?, keypressMode: SDLKeypressMode?, limitedCharacterList: [String]?, autoCompleteText: String?, autoCompleteList: [String]?)

Parameters

language

The language to set the keyboard to

layout

The layout of the keyboard

keypressMode

The mode of keypresses to use

limitedCharacterList

A list of characters restricting what the user is allowed to press

autoCompleteText

A string to show to user to complete what they are typing

autoCompleteList

A list of strings to show the user to complete what they are typing.

Return Value

The RPC object

-initWithLanguage:keyboardLayout:keypressMode:limitedCharacterList:autoCompleteList:

Convenience init with all properties.

Objective-C

- (nonnull instancetype)
        initWithLanguage:(nullable SDLLanguage)language
          keyboardLayout:(nullable SDLKeyboardLayout)keyboardLayout
            keypressMode:(nullable SDLKeypressMode)keypressMode
    limitedCharacterList:(nullable NSArray<NSString *> *)limitedCharacterList
        autoCompleteList:(nullable NSArray<NSString *> *)autoCompleteList;

Swift

init(language: SDLLanguage?, keyboardLayout: SDLKeyboardLayout?, keypressMode: SDLKeypressMode?, limitedCharacterList: [String]?, autoCompleteList: [String]?)

Parameters

language

- language

keyboardLayout

- keyboardLayout

keypressMode

- keypressMode

limitedCharacterList

- limitedCharacterList

autoCompleteList

- autoCompleteList

Return Value

A SDLKeyboardProperties object

-initWithLanguage:keyboardLayout:keypressMode:limitedCharacterList:autoCompleteList:maskInputCharacters:customKeys:

Objective-C

- (nonnull instancetype)
        initWithLanguage:(nullable SDLLanguage)language
          keyboardLayout:(nullable SDLKeyboardLayout)keyboardLayout
            keypressMode:(nullable SDLKeypressMode)keypressMode
    limitedCharacterList:(nullable NSArray<NSString *> *)limitedCharacterList
        autoCompleteList:(nullable NSArray<NSString *> *)autoCompleteList
     maskInputCharacters:(nullable SDLKeyboardInputMask)maskInputCharacters
              customKeys:(nullable NSArray<NSString *> *)customKeys;

Swift

init(language: SDLLanguage?, keyboardLayout: SDLKeyboardLayout?, keypressMode: SDLKeypressMode?, limitedCharacterList: [String]?, autoCompleteList: [String]?, maskInputCharacters: SDLKeyboardInputMask?, customKeys: [String]?)

Parameters

language

- language

keyboardLayout

- keyboardLayout

keypressMode

- keypressMode

limitedCharacterList

- limitedCharacterList

autoCompleteList

- autoCompleteList

maskInputCharacters

- maskInputCharacters

customKeys

- customKeys

Return Value

A SDLKeyboardProperties object

language

The keyboard language

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLLanguage language;

Swift

var language: SDLLanguage? { get set }

keyboardLayout

Desired keyboard layout

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLKeyboardLayout keyboardLayout;

Swift

var keyboardLayout: SDLKeyboardLayout? { get set }

keypressMode

Desired keypress mode.

If omitted, this value will be set to RESEND_CURRENT_ENTRY.

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLKeypressMode keypressMode;

Swift

var keypressMode: SDLKeypressMode? { get set }

limitedCharacterList

Array of keyboard characters to enable. All omitted characters will be greyed out (disabled) on the keyboard. If omitted, the entire keyboard will be enabled.

Optional

Objective-C

@property (nonatomic, strong, nullable) NSArray<NSString *> *limitedCharacterList;

Swift

var limitedCharacterList: [String]? { get set }

autoCompleteText

Deprecated, use autoCompleteList instead. {“string_min_length”: 1, “string_max_length”: 1000}

@deprecated in SmartDeviceLink 6.0.0 @added in SmartDeviceLink 3.0.0

Objective-C

@property (nonatomic, strong, nullable) NSString *autoCompleteText;

Swift

var autoCompleteText: String? { get set }

autoCompleteList

Allows an app to show a list of possible autocomplete suggestions as the user types

Optional, 1-100 items, max string length 1000 characters (note that these may not all be displayed on the screen)

Objective-C

@property (nonatomic, strong, nullable) NSArray<NSString *> *autoCompleteList;

Swift

var autoCompleteList: [String]? { get set }

maskInputCharacters

Allows an app to mask entered characters on HMI

@added in SmartDeviceLink 7.1.0

Objective-C

@property (nonatomic, strong, nullable) SDLKeyboardInputMask maskInputCharacters;

Swift

var maskInputCharacters: SDLKeyboardInputMask? { get set }

customKeys

Array of special characters to show in customizable keys. If omitted, keyboard will show default special characters {“array_min_size”: 1, “array_max_size”: 10, “string_min_length”: 1, “string_max_length”: 1}

@added in SmartDeviceLink 7.1.0

Objective-C

@property (nonatomic, strong, nullable) NSArray<NSString *> *customKeys;

Swift

var customKeys: [String]? { get set }