diff --git a/extension.ts b/extension.ts index b03eb56021e..9182fe834ad 100644 --- a/extension.ts +++ b/extension.ts @@ -94,6 +94,7 @@ export function activate(context: vscode.ExtensionContext) { registerCommand(context, 'extension.vim_ctrl_r', () => handleKeyEvent("ctrl+r")); registerCommand(context, 'extension.vim_ctrl_[', () => handleKeyEvent("ctrl+[")); + registerCommand(context, 'extension.vim_ctrl_c', () => handleKeyEvent("ctrl+c")); registerCommand(context, 'extension.vim_<', () => handleKeyEvent("<")); registerCommand(context, 'extension.vim_>', () => handleKeyEvent(">")); diff --git a/package.json b/package.json index 0b533d21b8b..31571547065 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ { "key": "Ctrl+[", "command": "extension.vim_ctrl_[", "when": "editorTextFocus" }, { "key": "Ctrl+r", "command": "extension.vim_ctrl_r", "when": "editorTextFocus" }, - + { "key": "Ctrl+c", "command": "extension.vim_ctrl_c", "when": "editorTextFocus" }, { "key": "Shift+,", "command": "extension.vim_<", "when": "editorTextFocus" }, { "key": "Shift+.", "command": "extension.vim_>", "when": "editorTextFocus" }, { "key": "oem_102", "command": "extension.vim_oem_102", "when": "editorTextFocus" }, diff --git a/src/mode/modeNormal.ts b/src/mode/modeNormal.ts index 6d1f2b6e6e7..2f855589685 100644 --- a/src/mode/modeNormal.ts +++ b/src/mode/modeNormal.ts @@ -39,7 +39,7 @@ export default class NormalMode extends Mode { } ShouldBeActivated(key : string, currentMode : ModeName) : boolean { - return (key === 'esc' || key === 'ctrl+['); + return (key === 'esc' || key === 'ctrl+[' || key === "ctrl+c"); } HandleActivation(key : string) : Thenable<{}> { diff --git a/test/mode/modeNormal.test.ts b/test/mode/modeNormal.test.ts index 2e3f52817d8..d02e5b17424 100644 --- a/test/mode/modeNormal.test.ts +++ b/test/mode/modeNormal.test.ts @@ -11,7 +11,7 @@ suite("Mode Normal", () => { teardown(cleanUpWorkspace); test("can be activated", () => { - let activationKeys = ['esc', 'ctrl+[']; + let activationKeys = ['esc', 'ctrl+[', 'ctrl+c']; let motion = new Motion(); let modeHandler = new ModeNormal(motion);