mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -24,6 +24,9 @@ interface CurrentChord {
|
||||
label: string | null;
|
||||
}
|
||||
|
||||
// Skip logging for high-frequency text editing commands
|
||||
const HIGH_FREQ_COMMANDS = /^(cursor|delete)/;
|
||||
|
||||
export abstract class AbstractKeybindingService extends Disposable implements IKeybindingService {
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
@@ -107,8 +110,8 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
|
||||
);
|
||||
}
|
||||
|
||||
public lookupKeybinding(commandId: string): ResolvedKeybinding | undefined {
|
||||
const result = this._getResolver().lookupPrimaryKeybinding(commandId);
|
||||
public lookupKeybinding(commandId: string, context?: IContextKeyService): ResolvedKeybinding | undefined {
|
||||
const result = this._getResolver().lookupPrimaryKeybinding(commandId, context);
|
||||
if (!result) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -263,7 +266,9 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
|
||||
} else {
|
||||
this._commandService.executeCommand(resolveResult.commandId, resolveResult.commandArgs).then(undefined, err => this._notificationService.warn(err));
|
||||
}
|
||||
this._telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: resolveResult.commandId, from: 'keybinding' });
|
||||
if (!HIGH_FREQ_COMMANDS.test(resolveResult.commandId)) {
|
||||
this._telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: resolveResult.commandId, from: 'keybinding' });
|
||||
}
|
||||
}
|
||||
|
||||
return shouldPreventDefault;
|
||||
|
||||
Reference in New Issue
Block a user