WorkspaceScope
Unofficial
The workspace’s key scope, which delegates each keypress to a scope chosen at the time of the press.
Import:
import type { WorkspaceScope } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface WorkspaceScope extends ScopeExtends: Scope
Constructor
new WorkspaceScope(parent?: Scope)Constructor.
To get the constructor instance, use getScopeConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| keys | KeyScope[] | Overridden keys that exist in this scope. (Inherited from Scope) | |
| parent | Scope | undefined | obsidian#Scope that this scope is a child of(Inherited from Scope) | |
| tabFocusContainerEl | HTMLElement | null | Container element that constrains tab-key focus cycling. (Inherited from Scope) | |
| win | null | Window | The window this scope is bound to, or null when not bound to a specific window.(Inherited from Scope) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| cb() | null | Scope | Returns the scope to hand the keypress to, the active leaf's view scope for the workspace. When it returns null, the keypress is handled by this scope's own keys and then its parent. | |
| handleKey($event, keypress) | unknown | Execute keypress within this scope. (Inherited from Scope) | |
| register(modifiers, key, func) | KeymapEventHandler | Add a keymap event handler to this scope. (Inherited from Scope) | |
| setTabFocusContainerEl(containerEl) | void | Sets the container element used for tab-focus handling. (Inherited from Scope) | |
| unregister(handler) | void | Remove an existing keymap event handler. (Inherited from Scope) |
Links to this page: