--- title: "Keyboard" slug: "170-manage-keyboard" updated: 2025-10-16T20:10:00Z published: 2025-12-09T18:02:06Z canonical: "docs.developer.comcast.com/170-manage-keyboard" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.developer.comcast.com/llms.txt > Use this file to discover all available pages before exploring further. # Keyboard --- title: Keyboard ## version: 1.7.0 layout: default sdk: manage # Keyboard Module --- Version Keyboard 1.7.0 ## Table of Contents - [Table of Contents](/docs/170-manage-keyboard#table-of-contents) - [Usage](/docs/170-manage-keyboard#usage) - [Overview](/docs/170-manage-keyboard#overview) - [Methods](/docs/170-manage-keyboard#methods) - [provide](/docs/170-manage-keyboard#provide) - [Private Methods](/docs/170-manage-keyboard#private-methods) **Show** - [emailFocus](/docs/170-manage-keyboard#emailfocus) - [emailResponse](/docs/170-manage-keyboard#emailresponse) - [passwordError](/docs/170-manage-keyboard#passworderror) - [passwordFocus](/docs/170-manage-keyboard#passwordfocus) - [passwordResponse](/docs/170-manage-keyboard#passwordresponse) - [standardError](/docs/170-manage-keyboard#standarderror) - [standardFocus](/docs/170-manage-keyboard#standardfocus) - [standardResponse](/docs/170-manage-keyboard#standardresponse) - [Private Events](/docs/170-manage-keyboard#private-events) **Show** - [onRequestPassword](/docs/170-manage-keyboard#onrequestpassword) - [onRequestStandard](/docs/170-manage-keyboard#onrequeststandard) - [Provider Interfaces](/docs/170-manage-keyboard#provider-interfaces) - [KeyboardInputProvider](/docs/170-manage-keyboard#keyboardinputprovider) - [Types](/docs/170-manage-keyboard#types) - [KeyboardParameters](/docs/170-manage-keyboard#keyboardparameters) - [KeyboardProviderRequest](/docs/170-manage-keyboard#keyboardproviderrequest) ## Usage To use the Keyboard module, you can import it into your project from the Firebolt SDK: ``` import { Keyboard } from '@firebolt-js/manage-sdk' ``` ## Overview Methods for prompting users to enter text with task-oriented UX ## Methods ### provide To provide a specific capability to the platform. See [Provider Interfaces](/docs/170-manage-keyboard#provider-interfaces) for a list of interfaces available to provide in this module. ``` provide(capability: string, provider: any): void ``` Parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | `capability` | `string` | Yes | The capability that is being provided. | | `provider` | `any` | Yes | An implementation of the required interface. | See [Provider Interfaces](/docs/170-manage-keyboard#provider-interfaces) for each capabilities interface definition. ## Private Methods **View** ### emailError *This is a private RPC method.* Internal API for Email Provider to send back error. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `correlationId` | `string` | true | | | `error` | `object` | true | | Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example 1 JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.emailError", "params": { "correlationId": "123", "error": { "code": 1, "message": "Error" } } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### emailFocus *This is a private RPC method.* Internal API for Email Provider to request focus for UX purposes. Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.emailFocus", "params": {} } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### emailResponse *This is a private RPC method.* Internal API for Email Provider to send back response. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `correlationId` | `string` | true | | | `result` | `string` | true | | Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.emailResponse", "params": { "correlationId": "123", "result": "email@address.com" } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### passwordError *This is a private RPC method.* Internal API for Password Provider to send back error. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `correlationId` | `string` | true | | | `error` | `object` | true | | Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example 1 JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.passwordError", "params": { "correlationId": "123", "error": { "code": 1, "message": "Error" } } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### passwordFocus *This is a private RPC method.* Internal API for Password Provider to request focus for UX purposes. Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.passwordFocus", "params": {} } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### passwordResponse *This is a private RPC method.* Internal API for Password Provider to send back response. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `correlationId` | `string` | true | | | `result` | `string` | true | | Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.passwordResponse", "params": { "correlationId": "123", "result": "password" } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### standardError *This is a private RPC method.* Internal API for Standard Provider to send back error. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `correlationId` | `string` | true | | | `error` | `object` | true | | Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example 1 JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.standardError", "params": { "correlationId": "123", "error": { "code": 1, "message": "Error" } } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### standardFocus *This is a private RPC method.* Internal API for Standard Provider to request focus for UX purposes. Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.standardFocus", "params": {} } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ### standardResponse *This is a private RPC method.* Internal API for Standard Provider to send back response. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `correlationId` | `string` | true | | | `result` | `string` | true | | Result: Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.standardResponse", "params": { "correlationId": "123", "result": "username" } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": null } ``` --- ## Private Events **View** ### onRequestEmail *This is a private RPC method.* Registers as a provider for when the user should be shown a keyboard optimized for email address entry. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `listen` | `boolean` | true | | Result: [KeyboardProviderRequest](/docs/170-manage-keyboard#keyboardproviderrequest) Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Default Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.onRequestEmail", "params": { "listen": true } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "correlationId": "abc", "parameters": { "message": "Enter your user name." } } } ``` --- ### onRequestPassword *This is a private RPC method.* Registers as a provider for when the user should be shown a password keyboard, with dots for each character entered. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `listen` | `boolean` | true | | Result: [KeyboardProviderRequest](/docs/170-manage-keyboard#keyboardproviderrequest) Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Default Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.onRequestPassword", "params": { "listen": true } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "correlationId": "abc", "parameters": { "message": "Enter your user name." } } } ``` --- ### onRequestStandard *This is a private RPC method.* Registers as a provider for when the user should be shown a standard keyboard. Parameters: | Param | Type | Required | Description | | --- | --- | --- | --- | | `listen` | `boolean` | true | | Result: [KeyboardProviderRequest](/docs/170-manage-keyboard#keyboardproviderrequest) Capabilities: | Role | Capability | | --- | --- | | provides | xrn:firebolt:capability:input:keyboard | #### Examples Default Example JSON-RPC: Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Keyboard.onRequestStandard", "params": { "listen": true } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "correlationId": "abc", "parameters": { "message": "Enter your user name." } } } ``` --- ## Provider Interfaces ### KeyboardInputProvider The provider interface for the `xrn:firebolt:capability:input:keyboard` capability. ``` ``` Usage: ``` Keyboard.provide('xrn:firebolt:capability:input:keyboard', provider: KeyboardInputProvider | object) ``` #### Examples **Register your app to provide the `xrn:firebolt:capability:input:keyboard` capability.** ``` import { Keyboard } from '@firebolt-js/manage-sdk' class MyKeyboardInputProvider { async standard(parameters, session) { return 'username' } async password(parameters, session) { return 'password' } async email(parameters, session) { return 'email@address.com' } } Keyboard.provide( 'xrn:firebolt:capability:input:keyboard', new MyKeyboardInputProvider(), ) ``` **JSON-RPC** **Register to recieve each provider API** Request: ``` { "id": 1, "method": "Keyboard.onRequestStandard", "params": { "listen": true } } { "id": 2, "method": "Keyboard.onRequestPassword", "params": { "listen": true } } { "id": 3, "method": "Keyboard.onRequestEmail", "params": { "listen": true } } ``` Response: ``` { "id": 1, "result": { "listening": true, "event": "Keyboard.onRequestStandard" } } { "id": 2, "result": { "listening": true, "event": "Keyboard.onRequestPassword" } } { "id": 3, "result": { "listening": true, "event": "Keyboard.onRequestEmail" } } ``` **Asynchronous event to initiate standard()** Event Response: ``` { "id": 1, "result": { "correlationId": undefined, "parameters": { "message": "Enter your user name." } } } ``` **App initiated response to event** Request: ``` { "id": 4, "method": "Keyboard.standardResponse", "params": { "correlationId": undefined, "result": "username" } } ``` Response: ``` { "id": 4, "result": true } ``` **Asynchronous event to initiate password()** Event Response: ``` { "id": 2, "result": { "correlationId": undefined, "parameters": { "message": "Enter your user name." } } } ``` **App initiated response to event** Request: ``` { "id": 5, "method": "Keyboard.passwordResponse", "params": { "correlationId": undefined, "result": "password" } } ``` Response: ``` { "id": 5, "result": true } ``` **Asynchronous event to initiate email()** Event Response: ``` { "id": 3, "result": { "correlationId": undefined, "parameters": { "message": "Enter your user name." } } } ``` **App initiated response to event** Request: ``` { "id": 6, "method": "Keyboard.emailResponse", "params": { "correlationId": undefined, "result": "email@address.com" } } ``` Response: ``` { "id": 6, "result": true } ``` ## Types ### KeyboardParameters ``` type KeyboardParameters = { message: string // The message to display to the user so the user knows what they are entering } ``` --- ### KeyboardProviderRequest ``` type KeyboardProviderRequest = { correlationId: string // An id to correlate the provider response with this request parameters: KeyboardParameters // The request to start a keyboard session } ``` See also: [KeyboardParameters](/docs/170-manage-keyboard#keyboardparameters) ---