ShortcutKey Service

Allows gadgets or components to create shortcut keys for any component or gadget-related actions.

Example

Code Snippet
Copyfinesse.shortcutkey.ShortcutKeyService.registerShortcutKey(arr);

Methods

getShorcutKeys()

Retrieves all the registered shortcut keys.

Example

Code Snippet
Copyfinesse.shortcutkey.ShortcutKeyService.getShortcutKeys();

Returns

{Array} The array of objects. The objects content includes the following:

  • {String} accessKey—The key combination for the shortcut.

  • {String} actionName—The name of the action or operation performed by the assigned shortcut keys.

  • {String} componentName—The name of the functionality, component, or the gadget.

  • {Boolean} conflict—Determines whether the shortcut key is conflicting with another shortcut key.

  • {Enum} executionScope—Determines the execution scope.

  • {Function} handler—The function that is invoked when the shortcut keys are pressed.

  • {String} id—Unique identifier of the gadget.

  • {Boolean} isPageLevel—Determines whether the shortcut key is at the page level.

  • {String} key—The main key to be combined with modifier keys.

  • {String} modifierKeys—The modifier key is used commonly in keyboard shortcuts on the host platform.

  • {String} type—Determines whether the shortcut key runs on component or gadget.

init()

Initiates the ShortcutKeyService for the Container or the gadgets.

Example

Code Snippet
Copyfinesse.shortcutkey.ShortcutKeyService.init();

registerShortcutKey(keys)

Registers the shortcut keys for the components or the gadgets. A key combination consists of a main key and a set of modifier keys. The main key is specified by its key character - key. A modifier key is Shift, Ctrl, Alt, or the combination.

Parameters

Name

Type

Description

Required

keys

Array

The array of key objects.

Yes

Example

Code Snippet
Copyfinesse.shortcutkey.ShortcutKeyService.init();
finesse.shortcutkey.ShortcutKeyService.registerShortcutKey(
    [{
        "id": "cisco_sample_gadget",
        "componentName": "Sample gadget",
        "actionName": "Sample gadget action name",
        "modifierKeys": finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS_CTRL,
        "key": "e",
        "executionScope": "activeTab",
        "handler": function() {}
    }]);

The following table lists the shortcut key registration payload details.

Name

Type

Description

Required

id

String

Unique identifier of the gadget.

Format: companyName_gadgetId_functionId

Optional

componentName

String

The name of the functionality, component, or the gadget.

Yes

actionName

String

The name of the action or operation performed by the assigned shortcut keys.

Yes

modifierKeys

String

The modifier key is used commonly in keyboard shortcuts on the host platform. The keyboard modifier key combinations are:

  • Ctrl + Shift (default)

  • Alt + Shift

  • Ctrl + Alt

  • Ctrl

  • Shift

  • Alt

These are predefined in ShortcutKeyService.CONSTANTS. For more information on predefined modifier keys, see ShortcutKeyService.CONSTANTS.

Optional

key

String

The main key to be combined with modifier keys.

For example, Ctrl + Shift + e where Ctrl and Shift are the modifiers keys, and e is the main key.

Yes

executionScope

Enum

Determines the execution scope.

  • activeTab: If the gadget is in currently active tab, only then the shortcut keys of that gadget are run.

  • activeFrame: If the gadget is in focus, only then the shortcut keys of that gadget are run.

For more information on CONSTANTS, see ShortcutKeyService.CONSTANTS.

Yes

handler

Function

The function that is invoked when the shortcut keys are pressed.

Yes

ShortcutKeyService.CONSTANTS

The following table lists the predefined modifier keys.

Shortcut Key

Modifier Key

Ctrl + Shift

finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS.CTRL_SHIFT

Alt + Shift

finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS.ALT_SHIFT

Ctrl + Alt

finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS.CTRL_ALT

Ctrl

finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS.CTRL

Shift

finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS.SHIFT

Alt

finesse.shortcutkey.ShortcutKeyService.CONSTANTS.MODIFIER_KEYS.ALT

Note
  • When shortcut keys are used, the callback that is registered by the gadget is run. The gadgets or components perform a specific action on callback.

  • Components or gadgets register the shortcut keys on a successful sign in to Finesse desktop.

  • After deploying the third-party gadgets, sign in as an agent and as a supervisor to check if there are any shortcut key conflicts. Resolve them if any.

sendKeyupEvent(keyEvent)

Sends the Keyup event object to the Finesse container. If there is any custom iFrame created by the gadget that is not controlled by Finesse, then the Finesse shortcut key framework cannot capture the KeyupEvent from that custom iFrame to run the shortcut keys.

The Keyup event occurs when a keyboard key is released. The Keyup event object is captured inside the child iFrame and propagated to its immediate parent. The parent again has to propagate the event until the event reaches the Finesse container. When 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.

Example

Code Snippet
Copyvar keyEvent = {
    ctrlKey: event.ctrlKey,
    altKey: event.altKey,
    shiftKey: event.shiftKey,
    keyCode: event.keyCode,
    key: event.key
};
 
sendKeyupEvent(keyEvent);

Parameters

Name

Type

Description

Required

keyEvent

Object

The key event sent to the Finesse container.

Yes

Shortcut Keys List

The following table lists out-of-the-box agent-specific shortcut keys which should not be used by third-party applications. If the same shortcut keys are used it results in conflict.

Agent Shortcut Keys List (Windows)
GroupActionShortcut Key

Agent State

Ready for CallCtrl + Alt + R
Not Ready for CallCtrl + Alt + N
Open Digital Channel State ControlCtrl + Shift + L
Ready for All Digital ChannelsCtrl + Shift + V
Not Ready for All Digital ChannelsCtrl + Shift + Z

Application

Switch between PopoverCtrl + Alt + P
Maximize/Restore viewCtrl + Shift + 0

Call Handling

Make New CallCtrl + Alt + O
Direct Transfer CallCtrl + Alt + Q
Open Keypad (DTMF)Ctrl + Alt + K
Open ConsultCtrl + Alt + C
Wrap-Up CallCtrl + Alt + W
Reclassify CallCtrl + Alt + Y
Schedule CallbackCtrl + Alt + S
Answer/Accept CallCtrl + Alt + A
Close - Remove Record from CampaignCtrl + Alt + J
Reject - Return Record to Campaign/Close this CallbackCtrl + Alt + U
End CallCtrl + Alt + E
Hold CallCtrl + Alt + V
Retrieve CallCtrl + Alt + G
Transfer CallCtrl + Alt + X
Conference CallCtrl + Alt + H

Desktop Chat

Toggle, Minimize and Maximize Chat WindowCtrl + Shift + 1
Open Desktop ChatCtrl + Shift + 3

Edit Call Variable

Save Edited Call Variable Values

Ctrl + Alt + M

Revert Edited Call Variable Values

Ctrl + Alt + Z

Keyboard ShortcutsKeyboard Shortcuts ListCtrl + Alt + F
NavigationHomeCtrl + Alt + 1
My HistoryCtrl + Alt + 2
My StatisticsCtrl + Alt + 3
Manage CustomerCtrl + Alt + 4
Send Error ReportSend Error ReportCtrl + Shift + 2
Sign OutSign OutCtrl + Alt + L
Agent State (for Unified CCE)Ready for EmailCtrl + Shift + 4
Ready for ChatCtrl + Shift + 5
Not Ready for EmailCtrl + Shift + 6
Not Ready for ChatCtrl + Shift + 7
Supervisor Shortcut Keys List (Windows)
GroupActionShortcut Key
Call HandlingBarge in CallCtrl + Alt + B
Drop ParticipantCtrl + Alt + D
Team MessageOpen Team Message WindowCtrl + Shift + Y
Team PerformanceSelect TeamCtrl + Shift + F