Skip to content

Commit 3d6e5f3

Browse files
CalvinsQiwdoxshzt
authored andcommitted
快捷键禁用&终端禁用
1 parent 9b91166 commit 3d6e5f3

3 files changed

Lines changed: 1058 additions & 4 deletions

File tree

patches/disable_terminal_keybind.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ index da0388a5435..fb91e3665c5 100644
55
@@ -132,9 +132,9 @@ export class ExternalTerminalContribution extends Disposable implements IWorkben
66
when: shouldShowExternalKindOnLocal
77
};
8-
8+
99
-
1010
- MenuRegistry.appendMenuItem(MenuId.ExplorerContext, this._openInTerminalMenuItem);
1111
- MenuRegistry.appendMenuItem(MenuId.ExplorerContext, this._openInIntegratedTerminalMenuItem);
1212
+ // 屏蔽右键打开的终端
1313
+ //MenuRegistry.appendMenuItem(MenuId.ExplorerContext, this._openInTerminalMenuItem);
1414
+ //MenuRegistry.appendMenuItem(MenuId.ExplorerContext, this._openInIntegratedTerminalMenuItem);
15-
15+
1616
this._register(this._configurationService.onDidChangeConfiguration(e => {
1717
if (e.affectsConfiguration('terminal.explorerKind') || e.affectsConfiguration('terminal.external')) {
1818
diff --git code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/terminalService.ts code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/terminalService.ts
@@ -22,7 +22,7 @@ index 152d14d7a9b..589cb6e0366 100644
2222
@@ -449,6 +449,11 @@ export class TerminalService extends Disposable implements ITerminalService {
2323
this._logService.trace('Pty host ready');
2424
}
25-
25+
2626
+ private _isTerminalDisabled(): boolean {
2727
+ return true
2828
+ }
@@ -33,7 +33,7 @@ index 152d14d7a9b..589cb6e0366 100644
3333
if (!remoteAuthority) {
3434
@@ -973,6 +978,11 @@ export class TerminalService extends Disposable implements ITerminalService {
3535
}
36-
36+
3737
async createTerminal(options?: ICreateTerminalOptions): Promise<ITerminalInstance> {
3838
+
3939
+ if (this._isTerminalDisabled()) {

patches/series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ app-name.diff
2727
disable_terminal_keybind.diff
2828
whitelist-keybingding.diff
2929
ui-hidden.diff
30+
whitelist-keybinding.patch
31+
whitelist-keybinding.diff

0 commit comments

Comments
 (0)