Skip to main content

contextKeyService

MS Code Extension API


MS Code Extension API / core/keybindings/contextKeyService

core/keybindings/contextKeyService

Classes

ContextKey

Defined in: core/keybindings/contextKeyService.ts:10

Encapsulates an isolated state variable bound within the context system. Acts as a fluent wrapper around the central service engine for direct property mutations.

Type Parameters

T

T

Constructors

Constructor

new ContextKey<T>(service, key, defaultValue): ContextKey<T>

Defined in: core/keybindings/contextKeyService.ts:14

Parameters
service

ContextKeyService

key

string

defaultValue

T

Returns

ContextKey<T>

Methods

get()

get(): T

Defined in: core/keybindings/contextKeyService.ts:26

Resolves the active state of the tracking property

Returns

T

reset()

reset(): void

Defined in: core/keybindings/contextKeyService.ts:31

Erases the key registration out of memory storage pools

Returns

void

set()

set(value): void

Defined in: core/keybindings/contextKeyService.ts:21

Overwrites the runtime value of the current bound key

Parameters
value

T

Returns

void

Variables

contextKeyService

const contextKeyService: ContextKeyService

Defined in: core/keybindings/contextKeyService.ts:162

Shared central singleton engine processing application status values, context priorities, and operational criteria routing loops.