How to disable Ctrl-Click in VS Code

心不动则不痛 提交于 2019-12-05 11:45:49

问题


Wanna know if it's possible to remove the key bind on Ctrl-Click for the goToDefinition (F12) editor action...

This is so annoying, every time i try to Ctrl+C/V it trigger and go to the definition cause i'm holding Ctrl while I'm highlighting the code with my mouse... May be it's just a bad habits I got but god I need to turn this off please.

I have search for it on google but all y can change is the F12 key bind for goToDefinition which is not what I want.

Thanks WoofWoofDude

--- Update

This is the feature i wanna disable

So i need to remove the ctrl+click key bind... Even if i replace it, it doesn't work.

-- Update 2

I finally found something on the subject :

https://github.com/Microsoft/vscode/issues/189

But for me it doesn't work at all...

-- Update 3

Created a new issue on github (#7827) Look at it if you wanna see the update on the request.


回答1:


Add the following lines in keybingings.json to disable (actually override default behaviour) mouse+ click

[
    { "key": "ctrl+[mouse button]",   "command": "cursorWordLeft",
                                         "when": "editorTextFocus" }
]

To open key bindings file, traverse

File > Preferences > Keyboard Shortcuts



来源:https://stackoverflow.com/questions/37683703/how-to-disable-ctrl-click-in-vs-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!