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

SDLKeyboardProperties Class Reference

Section Contents

Overview

Configuration of on-screen keyboard (if available)

-initWithLanguage:layout:keypressMode:limitedCharacterList:autoCompleteText:

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;

Swift

init(language: SDLLanguage?, layout: SDLKeyboardLayout?, keypressMode: SDLKeypressMode?, limitedCharacterList: [String]?, autoCompleteText: 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 the user to complete what they are typing

Return Value

The RPC object

-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

language

The keyboard language

Optional

Objective-C

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

Swift

var language: SDLLanguage? { get set }

keyboardLayout

Desired keyboard layout

Optional

Objective-C

@property (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic, nullable)
    NSArray<NSString *> *limitedCharacterList;

Swift

var limitedCharacterList: [String]? { get set }

autoCompleteText

Allows an app to prepopulate the text field with a suggested or completed entry as the user types

Optional

Objective-C

@property (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic, nullable)
    NSArray<NSString *> *autoCompleteList;

Swift

var autoCompleteList: [String]? { get set }
View on GitHub.com
Previous Section Next Section