Alexa.KeypadController interface sends a SendKeystroke directive with a keystroke value (e.g., UP, DOWN) to your app or Lambda.
KeypadController versus Built-in Scrolling and Selection Functionality
Fire TV already offers In-App Voice Scrolling and Selection as built-in functionality that most apps (whether VSK-integrated or not) receive for free on Fire TV. With this built-in functionality, Fire TV tries to guess how far it should scroll when a user says a scroll command (e.g., “Alexa, scroll right” or “Alexa, select this”). The in-app voice scrolling and selection works by mapping D-pad navigation events to your voice commands. D-pad refers to the remote control’s directional keypad (the “Navigation” ring around the Select button), which is used to scroll right, left, up, and down. Alexa converts these voice commands into D-pad navigation events that are sent to the app.KeypadController provides similar functionality but lets you control the scrolling and selection. If you declare KeypadController capability for your app, then the built-in voice scrolling and selection becomes inactive and KeypadController takes priority. You will receive the scrolling and selection directives directly in your app or Lambda, and you can fulfill the request. However, there usually isn’t a strong reason for implementing KeypadController over the built-in functionality already provided by Fire TV.
Utterances for SendKeystroke Directives
Users can make utterances related to the following:- Moving in a D-pad directions
- Selecting the element that has focus
- Scrolling through elements such as lists, menu items, titles, and descriptions
- Showing information that is currently offscreen
SendKeystroke directives to your app (for app-only integrations) or to your Lambda (for cloudside integrations) when users say the following utterances.
SendKeystroke Directive Example
The following is an exampleKeyStroke directive sent by the KeypadController interface:
- App-only Integrations
- Cloudside Integrations
payload contains the following:Payload Descriptions
TheSendKeystroke directive uses the keystroke property in the payload to specify what action should be taken.
keystroke include the following: UP, DOWN, LEFT, RIGHT, SELECT, PAGE_UP, PAGE_DOWN, PAGE_LEFT, PAGE_RIGHT, INFO, and MORE. These values are described in the following table.
| Keystroke type | Keystroke values | Description |
|---|---|---|
| Directional pad (d-pad) | UP, DOWN, LEFT, RIGHT, SELECT | Move up, down, left, or right one unit or to the next onscreen element, or select the element or item that has focus. |
| Scrolling | PAGE_UP, PAGE_DOWN, PAGE_LEFT, PAGE_RIGHT | Scroll in the specified direction. |
| Information | INFO, MORE | Display more information about the onscreen element that currently has focus. For example, show content that is offscreen, or jump to a detail page. |
Response Example
If you handle aSendKeystroke directive successfully, respond with an Alexa.Response event. You can respond synchronously or asynchronously. If you respond asynchronously, include a correlation token and a scope with an authorization token.
- App-only Integrations
- Cloudside Integrations
Declaring Capability Support for this Interface
- App-only Integrations
- Cloudside Integrations
KeypadController directives in your app, you must indicate support for this interface when you declare your capabilities. See the following for more information on declaring capabilities with app-only integrations:
