KeyboardRegistry
used for registering keyboards and performing certain actions on the keyboards.
(code example)
Usageβ
KeyboardRegistry.registerKeyboard('keyboardName', () => KeyboardComponent)
APIβ
addListenerβ
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
static function
getAllKeyboardsβ
Get all keyboards
static function
getKeyboardβ
Get a specific keyboard
componentID (string) - the ID of the keyboard.
static function
getKeyboardsβ
Get keyboards by IDs
componentIDs (string[]) - the ID of the keyboard.
static function
notifyListenersβ
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.
static function
onItemSelectedβ
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.
static function
registerKeyboardβ
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).
static function
removeListenersβ
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')
static function
requestShowKeyboardβ
Request to show the keyboard
componentID (string) - the ID of the keyboard.
static function