keybinding.ts ×1

Frontier kind: Code frontier

unlabeled · c_d9783ea68797

14 tests · 7434 LOC · 34 files · introduces 0 tests · 123 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
1 range123 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
945 ranges7434 lines · 34 files · Browse complete extent
All tests (intent)
14 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationmenuService.test|title=MenuService in group sorting, by title and order|occurrence=1 · 0 introduced LOCmenuService.test|title=M…menuService.ts ×2 · 7 introduced LOCmenuService.ts ×2menuService.ts ×1 · 1 introduced LOCmenuService.ts ×1menuService.ts ×2 · 19 introduced LOCmenuService.ts ×2menuService.ts ×2 · 4 introduced LOCmenuService.ts ×2menuService.ts ×29 · 223 introduced LOCmenuService.ts ×29actions.ts ×4 · 27 introduced LOCactions.ts ×4actions.ts ×7 · 32 introduced LOCactions.ts ×7actions.ts ×2 · 4 introduced LOCactions.ts ×2menuService.ts ×32 · 156 introduced LOCmenuService.ts ×32preferencesModels.ts ×2 · 4 introduced LOCpreferencesModels.ts ×2preferencesModels.test|title=DefaultSettings separates groups with same id but different titles|occurrence=1, preferencesModels.test|title=DefaultSettings groups settings correctly when extension id is same as group id|occurrence=1 · 0 introduced LOCpreferencesModels.test|t…preferencesModels.ts ×2 · 2 introduced LOCpreferencesModels.ts ×2preferencesModels.test|title=DefaultSettings groups settings by title when they share the same extension id|occurrence=1 · 0 introduced LOCpreferencesModels.test|t…preferencesModels.ts ×2 · 6 introduced LOCpreferencesModels.ts ×2preferencesModels.ts ×1 · 1 introduced LOCpreferencesModels.ts ×1preferencesModels.ts ×2 · 7 introduced LOCpreferencesModels.ts ×2preferencesModels.ts ×1 · 2 introduced LOCpreferencesModels.ts ×1preferencesModels.ts ×3 · 3 introduced LOCpreferencesModels.ts ×3preferencesModels.ts ×2 · 3 introduced LOCpreferencesModels.ts ×2preferencesModels.ts ×1 · 3 introduced LOCpreferencesModels.ts ×1preferencesModels.ts ×90 · 441 introduced LOCpreferencesModels.ts ×90files.ts ×1 · 4 introduced LOCfiles.ts ×1files.ts ×1 · 4 introduced LOCfiles.ts ×1files.ts ×1 · 4 introduced LOCfiles.ts ×1files.ts ×41 · 1348 introduced LOCfiles.ts ×41ternarySearchTree.ts ×60 · 193 introduced LOCternarySearchTree.ts ×60actions.ts ×25 · 151 introduced LOCactions.ts ×25instantiation.ts ×1 · 2 introduced LOCinstantiation.ts ×1network.ts ×20 · 292 introduced LOCnetwork.ts ×20strings.ts ×101 · 542 introduced LOCstrings.ts ×101event.ts ×8 · 30 introduced LOCevent.ts ×8cancellation.ts ×18 · 90 introduced LOCcancellation.ts ×18lifecycle.ts ×2 · 3 introduced LOClifecycle.ts ×2event.ts ×3 · 4 introduced LOCevent.ts ×3event.ts ×1 · 1 introduced LOCevent.ts ×1event.ts ×4 · 9 introduced LOCevent.ts ×4event.ts ×2 · 4 introduced LOCevent.ts ×2lifecycle.ts ×2 · 6 introduced LOClifecycle.ts ×2event.ts ×2 · 6 introduced LOCevent.ts ×2event.ts ×93 · 864 introduced LOCevent.ts ×93platform.ts ×1 · 6 introduced LOCplatform.ts ×1utils.ts ×3 · 9 introduced LOCutils.ts ×3instantiation.ts ×4 · 10 introduced LOCinstantiation.ts ×4nls.ts ×1 · 1 introduced LOCnls.ts ×1errorMessage.ts ×6 · 29 introduced LOCerrorMessage.ts ×6linkedList.ts ×13 · 44 introduced LOClinkedList.ts ×13nls.ts ×6 · 13 introduced LOCnls.ts ×6instantiation.ts ×5 · 111 introduced LOCinstantiation.ts ×5platform.ts ×5 · 46 introduced LOCplatform.ts ×5types.ts ×1 · 2 introduced LOCtypes.ts ×1lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2types.ts ×1 · 2 introduced LOCtypes.ts ×1assert.ts ×2 · 2 introduced LOCassert.ts ×2lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lifecycle.ts ×3 · 9 introduced LOClifecycle.ts ×3types.ts ×1 · 2 introduced LOCtypes.ts ×1types.ts ×2 · 5 introduced LOCtypes.ts ×2types.ts ×1 · 2 introduced LOCtypes.ts ×1types.ts ×1 · 2 introduced LOCtypes.ts ×1lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lifecycle.ts ×2 · 2 introduced LOClifecycle.ts ×2lazy.ts ×1 · 2 introduced LOClazy.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lazy.ts ×3 · 37 introduced LOClazy.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1uint.ts ×2 · 43 introduced LOCuint.ts ×2lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/actions.ts · 294 LOCcommon/actions.tssrc/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/cache.ts · 153 LOCcommon/cache.tssrc/vs/base/common/cancellation.ts · 206 LOCcommon/cancellation.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errorMessage.ts · 113 LOCcommon/errorMessage.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/event.ts · 1964 LOCcommon/event.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lazy.ts · 57 LOCcommon/lazy.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/linkedList.ts · 151 LOCcommon/linkedList.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/network.ts · 440 LOCcommon/network.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/stopwatch.ts · 41 LOCcommon/stopwatch.tssrc/vs/base/common/strings.ts · 1413 LOCcommon/strings.tssrc/vs/base/common/ternarySearchTree.ts · 796 LOCcommon/ternarySearchTree…src/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uint.ts · 59 LOCcommon/uint.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/actions/common/actions.ts · 774 LOCcommon/actions.tssrc/vs/platform/actions/common/menuService.ts · 501 LOCcommon/menuService.tssrc/vs/platform/commands/test/common/nullCommandService.ts · 16 LOCcommon/nullCommandServic…src/vs/platform/files/common/files.ts · 1658 LOCcommon/files.tssrc/vs/platform/instantiation/common/instantiation.ts · 130 LOCcommon/instantiation.tssrc/vs/platform/keybinding/common/keybinding.ts · 123 LOCcommon/keybinding.tssrc/vs/platform/keybinding/test/common/mockKeybindingService.ts · 178 LOCcommon/mockKeybindingSer…src/vs/platform/registry/common/platform.ts · 63 LOCcommon/platform.tssrc/vs/workbench/common/editor/editorModel.ts · 50 LOCeditor/editorModel.tssrc/vs/workbench/services/preferences/common/preferencesModels.ts · 1219 LOCcommon/preferencesModels…menuService.test|title=MenuService Extension contributed submenus missing with errors in output #155030|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/actions/test/common/menuService.test|title=MenuService Extension contributed submenus missing with errors in output #155030|occurrence=1menuService.test|title=M…menuService.test|title=MenuService group sorting|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/actions/test/common/menuService.test|title=MenuService group sorting|occurrence=1menuService.test|title=M…menuService.test|title=MenuService in group sorting, by title and order|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/actions/test/common/menuService.test|title=MenuService in group sorting, by title and order|occurrence=1menuService.test|title=M…menuService.test|title=MenuService in group sorting, by title|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/actions/test/common/menuService.test|title=MenuService in group sorting, by title|occurrence=1menuService.test|title=M…menuService.test|title=MenuService in group sorting, special: navigation|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/actions/test/common/menuService.test|title=MenuService in group sorting, special: navigation|occurrence=1menuService.test|title=M…menuService.test|title=MenuService special MenuId palette|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/actions/test/common/menuService.test|title=MenuService special MenuId palette|occurrence=1menuService.test|title=M…preferencesModels.test|title=DefaultSettings groups settings by id when they share the same extension id and have no title|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings groups settings by id when they share the same extension id and have no title|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings groups settings by title when they share the same extension id|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings groups settings by title when they share the same extension id|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings groups settings correctly when extension id is same as group id|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings groups settings correctly when extension id is same as group id|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings merges untitled group into titled group if id matches|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings merges untitled group into titled group if id matches|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings separates groups with same id (no title) but different extension ids|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings separates groups with same id (no title) but different extension ids|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings separates groups with same id and title but different extension ids|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings separates groups with same id and title but different extension ids|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings separates groups with same id but different titles|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings separates groups with same id but different titles|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings sorts groups by order|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings sorts groups by order|occurrence=1preferencesModels.test|t…Focused concept · keybinding.ts ×1 · 123 introduced LOCkeybinding.ts ×1

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 123 introduced LOC across 1 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/keybinding/common/keybinding.ts 123 introduced LOC · 1 range

Open complete file

1 > /*--------------------------------------------------------------------------------------------- keybinding.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { Event } from '../../../base/common/event.js';
7 > import { IJSONSchema } from '../../../base/common/jsonSchema.js';
8 > import { KeyCode } from '../../../base/common/keyCodes.js';
9 > import { ResolvedKeybinding, Keybinding } from '../../../base/common/keybindings.js';
10 > import { IDisposable } from '../../../base/common/lifecycle.js';
11 > import { IContextKeyService, IContextKeyServiceTarget } from '../../contextkey/common/contextkey.js';
12 > import { createDecorator } from '../../instantiation/common/instantiation.js';
13 > import { ResolutionResult } from './keybindingResolver.js';
14 > import { ResolvedKeybindingItem } from './resolvedKeybindingItem.js';
15 >
16 > export interface IUserFriendlyKeybinding {
17 > key: string;
18 > command: string;
19 > args?: any;
20 > when?: string;
21 > /**
22 > * When `true`, the keybinding is registered as a system-wide (OS global) shortcut that fires
23 > * even when VS Code does not have focus. Desktop only; ignored on web/server. Only honored for
24 > * user `keybindings.json` entries (not extension-contributed keybindings).
25 > */
26 > systemWide?: boolean;
27 > }
28 >
29 > export interface IKeyboardEvent {
30 > readonly _standardKeyboardEventBrand: true;
31 >
32 > readonly ctrlKey: boolean;
33 > readonly shiftKey: boolean;
34 > readonly altKey: boolean;
35 > readonly metaKey: boolean;
36 > readonly altGraphKey: boolean;
37 > readonly keyCode: KeyCode;
38 > readonly code: string;
39 > }
40 >
41 > export interface KeybindingsSchemaContribution {
42 > readonly onDidChange?: Event<void>;
43 >
44 > getSchemaAdditions(): IJSONSchema[];
45 > }
46 >
47 > export const IKeybindingService = createDecorator<IKeybindingService>('keybindingService');
48 >
49 > export interface IKeybindingService {
50 > readonly _serviceBrand: undefined;
51 >
52 > readonly inChordMode: boolean;
53 >
54 > readonly onDidUpdateKeybindings: Event<void>;
55 >
56 > /**
57 > * Returns none, one or many (depending on keyboard layout)!
58 > */
59 > resolveKeybinding(keybinding: Keybinding): ResolvedKeybinding[];
60 >
61 > resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): ResolvedKeybinding;
62 >
63 > resolveUserBinding(userBinding: string): ResolvedKeybinding[];
64 >
65 > /**
66 > * Resolve and dispatch `keyboardEvent` and invoke the command.
67 > */
68 > dispatchEvent(e: IKeyboardEvent, target: IContextKeyServiceTarget): boolean;
69 >
70 > /**
71 > * Resolve and dispatch `keyboardEvent`, but do not invoke the command or change inner state.
72 > */
73 > softDispatch(keyboardEvent: IKeyboardEvent, target: IContextKeyServiceTarget): ResolutionResult;
74 >
75 > /**
76 > * Enable hold mode for this command. This is only possible if the command is current being dispatched, meaning
77 > * we are after its keydown and before is keyup event.
78 > *
79 > * @returns A promise that resolves when hold stops, returns undefined if hold mode could not be enabled.
80 > */
81 > enableKeybindingHoldMode(commandId: string): Promise<void> | undefined;
82 >
83 > dispatchByUserSettingsLabel(userSettingsLabel: string, target: IContextKeyServiceTarget): void;
84 >
85 > /**
86 > * Look up keybindings for a command.
87 > * Use `lookupKeybinding` if you are interested in the preferred keybinding.
88 > */
89 > lookupKeybindings(commandId: string): ResolvedKeybinding[];
90 >
91 > /**
92 > * Look up the preferred (last defined) keybinding for a command.
93 > * @returns The preferred keybinding or null if the command is not bound.
94 > */
95 > lookupKeybinding(commandId: string, context?: IContextKeyService, enforceContextCheck?: boolean): ResolvedKeybinding | undefined;
96 >
97 > getDefaultKeybindingsContent(): string;
98 >
99 > getDefaultKeybindings(): readonly ResolvedKeybindingItem[];
100 >
101 > getKeybindings(): readonly ResolvedKeybindingItem[];
102 >
103 > customKeybindingsCount(): number;
104 >
105 > /**
106 > * Will the given key event produce a character that's rendered on screen, e.g. in a
107 > * text box. *Note* that the results of this function can be incorrect.
108 > */
109 > mightProducePrintableCharacter(event: IKeyboardEvent): boolean;
110 >
111 > registerSchemaContribution(contribution: KeybindingsSchemaContribution): IDisposable;
112 >
113 > toggleLogging(): boolean;
114 >
115 > /**
116 > * Given a UI element label and a command ID, appends the keybinding label if any.
117 > * If the command is defined and has a keybinding, returns `${label} (keybinding label)`, otherwise just `label`.
118 > */
119 > appendKeybinding(label: string, commandId: string | undefined | null, context?: IContextKeyService, enforceContextCheck?: boolean): string;
120 >
121 > _dumpDebugInfo(): string;
122 > _dumpDebugInfoJSON(): string;
123 > }