Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IKeyboardManager

interface IKeyboardManager
Extends com.amazon.apmf.IStandard The IKeyboardManager interface offers methods to interact with the keyboard, including displaying or hiding the on-screen keyboard. It provides methods for managing text input shown on keyboard.

Methods

show()

void show()
Displays the on-screen keyboard. This method is used to trigger the on-screen keyboard, making it visible to the user. When called, notifies all registered IKeyboardListener instances across all windows. Note :
  • None of the keyboard listeners will indicate whether the keyboard was opened by their window or different window.
  • To distinguish if the listener was triggered for a window that opened the keyboard, use IKeyboardManager2::showForView.

Throws


hide()

void hide()
Hides the on-screen keyboard. This method is used to dismiss the on-screen keyboard, hiding it from view.

Throws


setExtractedText()

void setExtractedText(com.amazon.kepler.uitoolkit.graphics.IAttributedText* attributedText, u32 selStart, u32 selEnd, u32 startOffset)
Send text to on-screen keyboard to update the inner input field. This method should only be used for full-screen keyboard. Since the application is covered by the keyboard window, it should sync its text contents to the keyboard so that the keyboard can present it to the user.

Parameters

attributedText
com.amazon.kepler.uitoolkit.graphics.IAttributedText* — Required IAttributedText Attributed Text to be added to the input field of keyboard.
selStart
u32 — Required Position of selection begin after update.
selEnd
u32 — Required Position of selection end after update.
startOffset
u32 — Required The starting position of update. Will remove text after this position before update. Default value is 0.

Throws


setCursorSelection()

void setCursorSelection(u32 start, u32 end)
This method is used to notify keyboard about the changing of input context. example, when the cursor is moved by user’s actions, like cut/paste operation.

Parameters

start
u32 — Required Index to start the selection from.
end
u32 — Required Index to stop the selection at.

Throws


setInputType()

void setInputType(com.amazon.kepler.intl.input_method.InputType* inputType)
Sets the input type of the keyboard. The default input type is InputType::NORMAL.

Parameters

inputType
com.amazon.kepler.intl.input_method.InputType* — Required enum of type InputType.

setInputAction()

void setInputAction(com.amazon.kepler.intl.input_method.InputAction* inputAction)
Set the text in the return button of the keyboard and decides the type of action taken on click of the return key. The default action is InputAction::NONE, where the keyboard shows the regular “Enter” text on the return key and performs no special action.

Parameters

inputAction
com.amazon.kepler.intl.input_method.InputAction* — Required enum of type InputAction.

setInputUiMode()

void setInputUiMode(com.amazon.kepler.intl.input_method.InputUiMode* inputUiMode)
Sets the user interface mode for the keyboard. The default mode is InputUiMode::FULL_SCREEN.

Parameters

inputUiMode
com.amazon.kepler.intl.input_method.InputUiMode* — Required enum value of type InputUiMode.

setInputUiRegion()

void setInputUiRegion(com.amazon.kepler.uitoolkit.graphics.Rect* inputUiRegion)
Sets the rectangular region only when InputUiMode::FLOATING, ignored otherwise. The default value is {0.0,0.0,0.0,0.0}. When default or invalid value is set like {100.0,100.0,0.0,300.0}, then keyboard will be opened in InputUiMode::FULL_SCREEN.

Parameters

inputUiRegion
com.amazon.kepler.uitoolkit.graphics.Rect* — Required Rect float coordinates of type Rect.

setPlaceholder()

void setPlaceholder(string placeholder)
Sets the placeholder text of the InputUiMode::FULL_SCREEN. The default value is an empty string.

Parameters

placeholder
string — Required string to set placeholder text.

setLanguage()

void setLanguage(string language)
Sets the language for keyboard. The default value is “en_US”.

Parameters

language
string — Required to set language of keyboard.

setInputFlags()

void setInputFlags(com.amazon.kepler.intl.input_method.InputFlag[] inputFlags)
Sets the list of input flags on the keyboard.

Parameters

inputFlags
com.amazon.kepler.intl.input_method.InputFlag[] — Required list of enum of type InputFlag.

setPreferredTheme()

void setPreferredTheme(com.amazon.kepler.intl.input_method.Theme* theme)
Set the theme that the keyboard should use. The default value is Theme::SYSTEM_DEFAULT.

Parameters

theme
com.amazon.kepler.intl.input_method.Theme* — Required preferred theme of on-screen keyboard of type Theme.

setAutoCapMode()

void setAutoCapMode(com.amazon.kepler.intl.input_method.AutoCapMode* autoCapMode)
Set the auto capitalization flag. The default value is AutoCapMode::NONE.

Parameters

autoCapMode
com.amazon.kepler.intl.input_method.AutoCapMode* — Required The auto capitalization mode of type AutoCapMode.

setAuxiliaryOptions()

void setAuxiliaryOptions(IAuxiliaryOptions* options)
Sets auxiliary options which are used to customize keyboard layouts like keyboardTitle, actionButton labels etc.

Parameters

options
IAuxiliaryOptions* — Required Pointer to IAuxiliaryOptions object.
Last modified on October 29, 2026