Shortcut Technical Reference

Summary

  • Shortcuts are defined in Shortcut State
  • programmatic access to Shortcuts is through Shortcut API

Shortcut State

The Shortcut section of Initial Adaptable State contains a single collection of Shortcut objects:

PropertyDescription
ShortcutsCollection of Shortcuts - designed to speed up data entry

Shortcut Object

The Shortcut object contains 4 mandatory properties:

PropertyDescription
NameName of the Shortcut
ScopeNumeric Columns where Shortcut is applied
ShortcutKeyKey which triggers the Shortcut when pressed
ShortcutOperationThe Operation: 'Add', 'Subtract', 'Multiply', 'Divide'
ShortcutValueValue acting as 2nd operand for ShortcutOperation (1st operand is the cell value)
IsReadOnlySets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedSuspends (i.e. turns off) an Adaptable Object

Shortcut API

The Shortcut API section of Adaptable API contains many Shortcut-related methods including enabling fetching, creating, editing, deleting and suspending Shortcuts.

MethodDescription
addShortcut(shortcut)Adds new Shortcut to the state
deleteShortcut(shortcut)Deletes Shortcut from the state
editShortcut(shortcut)Edits Shortcut in state
getActiveShortcuts(config)Gets all active (not-suspended) Shortcuts in Adaptable State
getShortcutById(id, config)Retrieves Shortcut by Id
getShortcutByName(name)Retrieves a Shortcut by its Name
getShortcuts(config)Gets all Shortcuts in Adaptable State
getShortcutState()Retrieves Shortcut section from Adaptable State
getSuspendedShortcuts(config)Gets all suspended Shortcuts in Adaptable State
openShortcutSettingsPanel()Opens Settings Panel with Shortcut section selected and visible
suspendAllShortcut()Suspends all Shortcuts
suspendShortcut(shortcut)Suspends Shortcut definition
unSuspendAllShortcut()Activates all suspended Shortcut
unSuspendShortcut(shortcut)Activates a suspended Shortcut definition