KeyboardRegistry
used for registering keyboards and performing certain actions on the keyboards.
(code example)
#
UsageKeyboardRegistry.registerKeyboard('keyboardName', () => KeyboardComponent)
#
API#
addListenerAdd 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
#
getAllKeyboardsGet all keyboards
static function
#
getKeyboardGet a specific keyboard
componentID (string) - the ID of the keyboard.
static function
#
getKeyboardsGet keyboards by IDs
componentIDs (string[]) - the ID of the keyboard.
static function
#
notifyListenersNotify 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
#
onItemSelectedDefault 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
#
registerKeyboardRegister 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
#
removeListenersRemove 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
#
requestShowKeyboardRequest to show the keyboard
componentID (string) - the ID of the keyboard.
static function