API Reference
@univerjs
@univerjs/ui
classes
Shortcutservice

@univerjs/ui v0.1.17Docs


Class: ShortcutService

Extends

Implements

Constructors

new ShortcutService()

new ShortcutService(
   _commandService, 
   _platformService, 
   _contextService, 
   _layoutService?): ShortcutService

Parameters

ParameterType
_commandServiceICommandService
_platformServiceIPlatformService
_contextServiceIContextService
_layoutService?ILayoutService

Returns

ShortcutService

Overrides

Disposable.constructor

Defined in

packages/ui/src/services/shortcut/shortcut.service.ts:82 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
shortcutChanged$readonlyObservable<void>undefined-packages/ui/src/services/shortcut/shortcut.service.ts:76 (opens in a new tab)

Methods

dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

protected disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


forceEscape()

forceEscape(): IDisposable

Returns

IDisposable

Implementation of

IShortcutService.forceEscape

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

ParameterType
shortcutIShortcutItem<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

ParameterType
idstring

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

ParameterType
shortcutIShortcutItem<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

ParameterType
disableboolean

Returns

void

Implementation of

IShortcutService.setDisable

Defined in

packages/ui/src/services/shortcut/shortcut.service.ts:100 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.