@univerjs/ui v0.1.17 • Docs
Class: ShortcutService
Extends
Implements
Constructors
new ShortcutService()
new ShortcutService(
_commandService,
_platformService,
_contextService,
_layoutService?): ShortcutService
Parameters
Parameter | Type |
---|---|
_commandService | ICommandService |
_platformService | IPlatformService |
_contextService | IContextService |
_layoutService ? | ILayoutService |
Returns
Overrides
Defined in
packages/ui/src/services/shortcut/shortcut.service.ts:82 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
shortcutChanged$ | readonly | Observable <void > | undefined | - | packages/ui/src/services/shortcut/shortcut.service.ts:76 (opens in a new tab) |
Methods
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
protected disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
IDisposable
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
forceEscape()
forceEscape(): IDisposable
Returns
IDisposable
Implementation of
Defined in
packages/ui/src/services/shortcut/shortcut.service.ts:173 (opens in a new tab)
getAllShortcuts()
getAllShortcuts(): IShortcutItem<object>[]
Returns
IShortcutItem
<object
>[]
Implementation of
IShortcutService
.getAllShortcuts
Defined in
packages/ui/src/services/shortcut/shortcut.service.ts:104 (opens in a new tab)
getShortcutDisplay()
getShortcutDisplay(shortcut): string
Parameters
Parameter | Type |
---|---|
shortcut | IShortcutItem <object > |
Returns
string
Implementation of
IShortcutService
.getShortcutDisplay
Defined in
packages/ui/src/services/shortcut/shortcut.service.ts:154 (opens in a new tab)
getShortcutDisplayOfCommand()
getShortcutDisplayOfCommand(id): null | string
Parameters
Parameter | Type |
---|---|
id | string |
Returns
null
| string
Implementation of
IShortcutService
.getShortcutDisplayOfCommand
Defined in
packages/ui/src/services/shortcut/shortcut.service.ts:144 (opens in a new tab)
registerShortcut()
registerShortcut(shortcut): IDisposable
Parameters
Parameter | Type |
---|---|
shortcut | IShortcutItem <object > |
Returns
IDisposable
Implementation of
IShortcutService
.registerShortcut
Defined in
packages/ui/src/services/shortcut/shortcut.service.ts:110 (opens in a new tab)
setDisable()
setDisable(disable): void
Parameters
Parameter | Type |
---|---|
disable | boolean |
Returns
void
Implementation of
Defined in
packages/ui/src/services/shortcut/shortcut.service.ts:100 (opens in a new tab)