Skip to main content

KeyboardRegistry

KeyboardRegistry.registerKeyboard('keyboardName', () => KeyboardComponent)
APIThis is the list of additional props for the component

addListener
static function

Add a listener for a callback. globalID (string) - ID that includes the componentID and the event name (i.e. if componentID='kb1' globalID='kb1.onItemSelected') callback (function) - the callback to be called when the said event happens

getAllKeyboards
static function

Get all keyboards

getKeyboard
static function

Get a specific keyboard componentID (string) - the ID of the keyboard.

getKeyboards
static function

Get keyboards by IDs componentIDs (string[]) - the ID of the keyboard.

notifyListeners
static function

Notify that an event has occurred. globalID (string) - ID that includes the componentID and the event name (i.e. if componentID='kb1' globalID='kb1.onItemSelected') args (object) - data to be sent to the listener.

onItemSelected
static function

Default event to be used for when an item on the keyboard has been pressed. componentID (string) - the ID of the keyboard. args (object) - data to be sent to the listener.

registerKeyboard
static function

Register a new keyboard. componentID (string) - the ID of the keyboard. generator (function) - a function for the creation of the keyboard. params (object) - to be returned when using other methods (i.e. getKeyboards and getAllKeyboards).

removeListeners
static function

Remove a listener for a callback. globalID (string) - ID that includes the componentID and the event name (i.e. if componentID='kb1' globalID='kb1.onItemSelected')

requestShowKeyboard
static function

Request to show the keyboard componentID (string) - the ID of the keyboard.