Ti ringraziamo per la visita. Questa pagina è per il momento disponibile solo in inglese.

Alexa.KeypadController Interface (VSK FTV)

When users make requests to select or scroll through onscreen elements, the Alexa.KeypadController interface sends a SendKeystroke directive with a keystroke value (e.g., UP, DOWN) to your Lambda.

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

Alexa sends SendKeystroke directives to your Lambda when users say the following utterances.

Feature Sample Utterances Expected Response
Keypad Controller

Get next page

Alexa, scroll right

Alexa, page down

Alexa, go right

Alexa, move down

Alexa, select this

Alexa, choose this

Alexa, show details

Alexa, show info

Alexa, see more information

[translation coming soon]

[translation coming soon]

[translation coming soon]

[translation coming soon]

[translation coming soon]

For up, down, left, right commands, move up, down, left, or right one unit or to the next onscreen element.

For page right, page left, page down, page right commands, scroll in the specified direction.

For select commands, select the element or item that has focus.

For more info commands, display more information about the onscreen element that currently has focus. For example, show content that is offscreen, or jump to a detail page.

Example SendKeystroke Directive

The following is an example KeyStroke directive sent by the KeypadController interface to your Lambda:

{
  "directive": {
    "header": {
      "namespace": "Alexa.KeypadController",
      "name": "SendKeystroke",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "<an OAuth2 bearer token>"
      },
      "endpointId": "<endpoint id>",
      "cookie": {}
    },
    "payload": {
      "keystroke": "SELECT"
    }
  }
}

Payload Descriptions

The SendKeystroke directive uses the keystroke property in the payload to specify what action should be taken.

Field Description Type
keystroke The keystroke requested by the user. String

Possible values for 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 a SendKeystroke 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.

SendKeystroke response event example

{
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "Response",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "<an OAuth2 bearer token>"
      },
      "endpointId": "<endpoint id>"
    },
    "payload": {}
  }
}

Declaring Capability Support for this Interface

To indicate that your video skill supports the Alexa.KeypadController interface, you must indicate support for it in your response to the Discover directive sent through the Alexa.Discovery interface. See Declaring Capabilities for KeypadController Interface. Be sure to include a keys attribute and list the keystrokes that you support. Additionally, note that KeypadController requires Alexa Client Library version 1.4.5 or later. More details are provided in Alexa.Discovery.

Error Response

If you cannot complete the customer request for some reason, reply with an error. See Error Handling for more details.