ShortcutApi
Keyboard shortcuts that change a cell value.
export interfaceMethods
| Method | Returns | Description |
|---|---|---|
| addShortcut(shortcut) | Shortcut | Adds new Shortcut to the state |
| deleteShortcut(shortcut) | void | Deletes Shortcut from the state |
| editShortcut(shortcut) | Shortcut | Edits Shortcut in state |
| getActiveShortcuts() | Shortcut[] | Gets all active (not-suspended) Shortcuts in Adaptable State |
| getShortcutById(id) | Shortcut | Retrieves Shortcut by Id |
| getShortcutByName(name) | Shortcut | undefined | Retrieves a Shortcut by its Name |
| getShortcuts() | Shortcut[] | Gets all Shortcuts in Adaptable State |
| getShortcutState() | ShortcutState | Retrieves Shortcut section from Adaptable State |
| getSuspendedShortcuts() | Shortcut[] | Gets all suspended Shortcuts in Adaptable State |
| openShortcutSettingsPanel() | void | Opens Settings Panel with Shortcut section selected and visible |
| suspendAllShortcut() | void | Suspends all Shortcuts |
| suspendShortcut(shortcut) | Shortcut | Suspends Shortcut definition |
| unSuspendAllShortcut() | void | Activates all suspended Shortcut |
| unSuspendShortcut(shortcut) | Shortcut | Activates a suspended Shortcut definition |
Method Details
addShortcut
Adds new Shortcut to the state
addShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to add |
Returns
shortcut
deleteShortcut
Deletes Shortcut from the state
deleteShortcut(shortcut: Shortcut): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to delete |
Returns
void
editShortcut
Edits Shortcut in state
editShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to edit |
Returns
The shortcut after it is saved
getActiveShortcuts
Gets all active (not-suspended) Shortcuts in Adaptable State
getActiveShortcuts(): Shortcut[];Returns
shortcuts
Shortcut[]
getShortcutById
Retrieves Shortcut by Id
getShortcutById(id: Shortcut['Uuid']): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| id | Shortcut['Uuid'] | Shortcut id |
Returns
shortcut
getShortcutByName
Retrieves a Shortcut by its Name
getShortcutByName(name: string): Shortcut | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the Shortcut |
Returns
Shortcut or undefined if not found
Shortcut | undefined
getShortcuts
Gets all Shortcuts in Adaptable State
getShortcuts(): Shortcut[];Returns
shortcuts
Shortcut[]
getShortcutState
Retrieves Shortcut section from Adaptable State
getShortcutState(): ShortcutState;Returns
Shortcut section from Adaptable State
getSuspendedShortcuts
Gets all suspended Shortcuts in Adaptable State
getSuspendedShortcuts(): Shortcut[];Returns
shortcuts
Shortcut[]
openShortcutSettingsPanel
Opens Settings Panel with Shortcut section selected and visible
openShortcutSettingsPanel(): void;Returns
void
suspendAllShortcut
Suspends all Shortcuts
suspendAllShortcut(): void;Returns
void
suspendShortcut
Suspends Shortcut definition
suspendShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to suspend |
Returns
shortcut
unSuspendAllShortcut
Activates all suspended Shortcut
unSuspendAllShortcut(): void;Returns
void
unSuspendShortcut
Activates a suspended Shortcut definition
unSuspendShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to suspend |
Returns
shortcut