abstractKeybindingService.ts ×4

Frontier kind: Code frontier

unlabeled · c_7b5a2dde4fbf

6 tests · 11673 LOC · 57 files · introduces 0 tests · 10 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges10 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1652 ranges11673 lines · 57 files · Browse complete extent
All tests (intent)
6 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.

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.

2 files ranked by introduced lines: 10 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/keybinding/common/abstractKeybindingService.ts 6 introduced LOC · 4 ranges

Open complete file

125
126 public lookupKeybinding(commandId: string, context?: IContextKeyService, enforceContextCheck = false): ResolvedKeybinding | undefined {
127 > const result = this._getResolver().lookupPrimaryKeybinding(commandId, context || this._contextKeyService, enforceContextCheck); abstractKeybindingService.ts
128 > if (!result) {
129 return undefined;
130 }
131 return result.resolvedKeybinding;
133
134 public dispatchEvent(e: IKeyboardEvent, target: IContextKeyServiceTarget): boolean {
401 public appendKeybinding(label: string, commandId: string | undefined | null, context?: IContextKeyService, enforceContextCheck?: boolean): string {
402 if (commandId) {
403 > const keybindingLabel = this.lookupKeybinding(commandId, context, enforceContextCheck)?.getLabel(); abstractKeybindingService.ts
404 > if (keybindingLabel) {
405 return nls.localize(
406 { key: 'keybindingLabel', comment: ['UI element label', 'A keybinding label'] },
src/vs/platform/keybinding/common/keybindingResolver.ts 4 introduced LOC · 3 ranges

Open complete file

290
291 public lookupPrimaryKeybinding(commandId: string, context: IContextKeyService, enforceContextCheck = false): ResolvedKeybindingItem | null {
292 > const items = this._lookupMap.get(commandId); keybindingResolver.ts
293 > if (typeof items === 'undefined' || items.length === 0) {
294 return null;
295 }
296 > if (items.length === 1 && !enforceContextCheck) { keybindingResolver.ts
297 return items[0];
298 }