ShortcutApi

Provides run-time access to Shortcut Module and associated state

TypeScript
export interface

Methods

MethodReturnsDescription
addShortcut(shortcut)ShortcutAdds new Shortcut to the state
deleteShortcut(shortcut)voidDeletes Shortcut from the state
editShortcut(shortcut)ShortcutEdits Shortcut in state
getActiveShortcuts(config)Shortcut[]Gets all active (not-suspended) Shortcuts in Adaptable State
getShortcutById(id, config)ShortcutRetrieves Shortcut by Id
getShortcutByName(name)Shortcut | undefinedRetrieves a Shortcut by its Name
getShortcuts(config)Shortcut[]Gets all Shortcuts in Adaptable State
getShortcutState()ShortcutStateRetrieves Shortcut section from Adaptable State
getSuspendedShortcuts(config)Shortcut[]Gets all suspended Shortcuts in Adaptable State
openShortcutSettingsPanel()voidOpens Settings Panel with Shortcut section selected and visible
suspendAllShortcut()voidSuspends all Shortcuts
suspendShortcut(shortcut)ShortcutSuspends Shortcut definition
unSuspendAllShortcut()voidActivates all suspended Shortcut
unSuspendShortcut(shortcut)ShortcutActivates a suspended Shortcut definition

Method Details

addShortcut

Adds new Shortcut to the state

TypeScript
addShortcut(shortcut: Shortcut): Shortcut;
Parameters
ParameterTypeDescription
shortcutShortcutShortcut to add
Returns

Shortcut

deleteShortcut

Deletes Shortcut from the state

TypeScript
deleteShortcut(shortcut: Shortcut): void;
Parameters
ParameterTypeDescription
shortcutShortcutShortcut to delete
Returns

void

editShortcut

Edits Shortcut in state

TypeScript
editShortcut(shortcut: Shortcut): Shortcut;
Parameters
ParameterTypeDescription
shortcutShortcutShortcut to edit
Returns

Shortcut

getActiveShortcuts

Gets all active (not-suspended) Shortcuts in Adaptable State

TypeScript
getActiveShortcuts(config?: LayoutExtendedConfig): Shortcut[];
Parameters
ParameterType
configLayoutExtendedConfig
Returns

Shortcut[]

getShortcutById

Retrieves Shortcut by Id

TypeScript
getShortcutById(id: Shortcut['Uuid'], config?: LayoutExtendedConfig): Shortcut;
Parameters
ParameterTypeDescription
idShortcut['Uuid']Shortcut id
configLayoutExtendedConfig
Returns

Shortcut

getShortcutByName

Retrieves a Shortcut by its Name

TypeScript
getShortcutByName(name: string): Shortcut | undefined;
Parameters
ParameterTypeDescription
namestringName of the Shortcut
Returns

Shortcut | undefined

getShortcuts

Gets all Shortcuts in Adaptable State

TypeScript
getShortcuts(config?: LayoutExtendedConfig): Shortcut[];
Parameters
ParameterType
configLayoutExtendedConfig
Returns

Shortcut[]

getShortcutState

Retrieves Shortcut section from Adaptable State

TypeScript
getShortcutState(): ShortcutState;
Returns

ShortcutState

getSuspendedShortcuts

Gets all suspended Shortcuts in Adaptable State

TypeScript
getSuspendedShortcuts(config?: LayoutExtendedConfig): Shortcut[];
Parameters
ParameterType
configLayoutExtendedConfig
Returns

Shortcut[]

openShortcutSettingsPanel

Opens Settings Panel with Shortcut section selected and visible

TypeScript
openShortcutSettingsPanel(): void;
Returns

void

suspendAllShortcut

Suspends all Shortcuts

TypeScript
suspendAllShortcut(): void;
Returns

void

suspendShortcut

Suspends Shortcut definition

TypeScript
suspendShortcut(shortcut: Shortcut): Shortcut;
Parameters
ParameterTypeDescription
shortcutShortcutShortcut to suspend
Returns

Shortcut

unSuspendAllShortcut

Activates all suspended Shortcut

TypeScript
unSuspendAllShortcut(): void;
Returns

void

unSuspendShortcut

Activates a suspended Shortcut definition

TypeScript
unSuspendShortcut(shortcut: Shortcut): Shortcut;
Parameters
ParameterTypeDescription
shortcutShortcutShortcut to suspend
Returns

Shortcut