Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't remap certain ctrl+<key> #757

Closed
gen0083 opened this issue Sep 12, 2016 · 6 comments
Closed

Can't remap certain ctrl+<key> #757

gen0083 opened this issue Sep 12, 2016 · 6 comments

Comments

@gen0083
Copy link

gen0083 commented Sep 12, 2016

I want to set ctrl+] to escape.
But this is not work.

    "vim.insertModeKeyBindings": [
        {
        "before":["ctrl+]"],
        "after":["<Esc>"]
        }
    ]
@jpoon jpoon added the kind/bug label Sep 12, 2016
@gen0083
Copy link
Author

gen0083 commented Sep 12, 2016

I use a JIS-Keyboard.
In JIS-keyboards key "[" is "]".
So I want to reassign it in vscode-vim.

I added this in keybinding.json then it works.

{
    "key": "ctrl+]",
    "command": "extension.vim_ctrl+[",
    "when": "editorTextFocus && vim.useCtrlKeys"
}

@jpoon
Copy link
Member

jpoon commented Sep 12, 2016

As per microsoft/vscode#5280, the keybinding dispatching ignores modifier keys. If we want to be able to remap them, we would need to include all variants of them in the package.json.

@rebornix
Copy link
Member

I answered in our slack channel multiple times that the reason that we can't do this is because if we steal ctrl+key from Code, we can never delegate it back to Code, so it's not a good idea to put every ctrl+key to the contribution list if we just want to allow users to do the remapping.

I'll say it's an enhancement or feature request instead of a bug. It's limited to VS Code.

@yqrashawn
Copy link

@rebornix But we can still map ctrl+key back to code functions do we? Or keys like Command+Control+K will be still as well?

@jpoon jpoon changed the title Can't bind ctrl+] to other keybingings Can't remap certain ctrl+<key> Jun 16, 2018
@jpoon
Copy link
Member

jpoon commented Jun 16, 2018

Renaming this issue to be a bit more generic.

Our extension doesn't currently bind to those keys (https://github.com/VSCodeVim/Vim/blob/master/package.json#L140), hence they go straight to vscode bypassing vscodevim (ie. we have no knowledge of a ctrl+n key).

@jpoon
Copy link
Member

jpoon commented Aug 9, 2018

To keep the issue list to a sane number, closing this as we haven't seen a lot of traction. For requests to re-bind to certain ctrl keys, please file an individual request and we'll handle it on a case-by-case basis as we don't want to bind to every single key combination imaginable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants