Adds hot key combination for finding nodes in execution plans. (#19303)

* Adds hot key combination for finding nodes in execution plans.

* Captures cmd + f key combinations for other platforms

* Stops event propagation when targeted hot key sequence is pressed
This commit is contained in:
Lewis Sanchez
2022-05-06 14:14:47 -07:00
committed by GitHub
parent 20800a4279
commit 5f48e4a28d

View File

@@ -195,6 +195,15 @@ export class ExecutionPlanView implements ISashLayoutProvider {
});
}
};
this._container.onkeydown = (e: KeyboardEvent) => {
if ((e.ctrlKey || e.metaKey) && e.key === 'f') {
let searchNodeAction = self._instantiationService.createInstance(SearchNodeAction, 'HotKey');
searchNodeAction.run(self);
e.stopPropagation();
}
};
}
getHorizontalSashTop(sash: Sash): number {
@@ -271,7 +280,7 @@ export class ExecutionPlanView implements ISashLayoutProvider {
}
}
type ExecutionPlanActionSource = 'ContextMenu' | 'ActionBar';
type ExecutionPlanActionSource = 'ContextMenu' | 'ActionBar' | 'HotKey';
export class OpenQueryAction extends Action {
public static ID = 'ep.OpenQueryAction';