提交 cbc0c0e6 编写于 作者: D Daniel Imms

Make cmd+k clear terminal on Mac

Fixes #12585
上级 c6566148
......@@ -97,12 +97,13 @@
"command": "markdown.showPreview",
"key": "shift+ctrl+v",
"mac": "shift+cmd+v",
"when": "!terminalFocus"
"when": "editorFocus"
},
{
"command": "markdown.showPreviewToSide",
"key": "ctrl+k v",
"mac": "cmd+k v"
"mac": "cmd+k v",
"when": "editorFocus"
}
],
"snippets": [
......
......@@ -296,7 +296,7 @@ export class KeybindingResolver {
}
public resolve(context: any, currentChord: number, keypress: number): IResolveResult {
// console.log('resolve: ' + Keybinding.toLabel(keypress));
// console.log('resolve: ' + Keybinding.toUserSettingsLabel(keypress));
let lookupMap: ICommandEntry[] = null;
if (currentChord !== 0) {
......@@ -411,7 +411,7 @@ export class IOSupport {
} else {
out.write(`${quotedSerializeCommand} `);
}
// out.write(String(item.weight));
// out.write(String(item.weight1 + '-' + item.weight2));
out.write('}');
}
......
......@@ -22,6 +22,7 @@ import { TerminalService } from 'vs/workbench/parts/terminal/electron-browser/te
import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import debugActions = require('vs/workbench/parts/debug/browser/debugActions');
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
let configurationRegistry = <IConfigurationRegistry>Registry.as(Extensions.Configuration);
configurationRegistry.registerConfiguration({
......@@ -200,4 +201,6 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ScrollToTopTermi
primary: KeyMod.CtrlCmd | KeyCode.Home,
linux: { primary: KeyMod.Shift | KeyCode.Home }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Scroll to Top', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ClearTerminalAction, ClearTerminalAction.ID, ClearTerminalAction.LABEL), 'Terminal: Clear', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ClearTerminalAction, ClearTerminalAction.ID, ClearTerminalAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.KEY_K
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KeybindingsRegistry.WEIGHT.workbenchContrib(1)), 'Terminal: Clear', category);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册