Class Index | File Index

Classes


Class finesse.shortcutkey.ShortcutKeyService

ShortcutKeyService allows components or gadgets to create shortcut keys for any component or gadget related actions.
Defined in: finesse.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
This method allows you to get all the registered shortcut keys.
 
init()
This method initializes the ShortcutKeyService for the Container or the gadgets.
 
This method is used to register the shortcut keys for the components or the gadgets
 
sendKeyupEvent(keyEvent)
If there is any custom iframe created by the gadget that is not controlled by Finesse, the Finesse shortcut key framework cannot capture the keyup event from that custom iframe to execute the shortcut keys.
Class Detail
finesse.shortcutkey.ShortcutKeyService()
Method Detail
{Array} getShorcutKeys()
This method allows you to get all the registered shortcut keys.
Returns:
{Array} array of objects

init()
This method initializes the ShortcutKeyService for the Container or the gadgets.

registerShortcutKey(keys)
This method is used to register the shortcut keys for the components or the gadgets
var arr = [ {
 "id": "cisco_callhandling_endCall"
 "componentName": "Call Control",
 "actionName": "End Call",
 "modifierKeys": "ctrlKey + shiftKey",
 "key": "e",
 "handler": function () {}
}];
finesse.shortcutkey.ShortcutKeyService.registerShortcutKey(arr);


Shortcut Key registration payload details

AttributeTypeDescriptionRequired
idStringA unique id generated by gadget. The pattern for this id can be companyName_gadgetId_operation. Required
componentNameStringName of the functionality, component, or the gadget.Required
actionNameStringName of the action or operation performed by the assigned shortcut keys.Required
keyStringActual key combined with the modifier keys. For example, Ctrl + Shift + e where Ctrl and Shift are the modifiers keys and e is the actual key.Required
executionScopeENUM
  • ShortcutKeyService.CONSTANTS.EXECUTION_SCOPE.ACTIVE_TAB: If the gadget is in the currently active tab, only then the shortcut keys of that gadget are executed.
  • ShortcutKeyService.CONSTANTS.EXECUTION_SCOPE.ACTIVE_FRAME: If the gadget is in focus, only then the shortcut keys of that gadget are executed.
Required
modifierKeysENUM Keybaord modifier key combinations.
finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS.*
  • CTRL_SHIFT
  • ALT_SHIFT
  • CTRL_ALT
  • CTRL
  • SHIFT
  • ALT
Optional
callbackfunctionCallback function that is invoked when the shortcut keys are pressed.Required
Parameters:
keys
- Array of keys object:

sendKeyupEvent(keyEvent)
If there is any custom iframe created by the gadget that is not controlled by Finesse, the Finesse shortcut key framework cannot capture the keyup event from that custom iframe to execute the shortcut keys. This method can be used to send the Keyup event object to the Finesse container. The keyup event object has to be captured inside the child iFrame and propagated to its immediate parent. The parent again has to propagate the event to its immediate parent until the event reaches the Finesse container. Once the immediate parent is the Finesse container, then use sendKeyupEvent to propagate the event to Finesse container. Param object has to be serializable and cannot contain any functions.
var keyEvent = {
 ctrlKey: event.ctrlKey,
 altKey: event.altKey,
 shiftKey: event.shiftKey,
 keyCode: event.keyCode,
 key: event.key
}
Parameters:
keyEvent
- Object

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Jan 02 2020 09:55:47 GMT-0500 (EST)