Vscode: Ctrl + Click is not working VS Code Editor(Javascript file)

Created on 8 Aug 2017  路  5Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.14.2
  • OS Version: Ubuntu 14.04 LTS

Steps to Reproduce:

  1. create a Javascript function
  2. invoke that function
  3. Do a Ctrl + click -> earlier it used to go to that definition. But after recent update it is not going to that definition. BTW, F12 is working.


Reproduces without extensions: Yes/No

linux needs more info

Most helpful comment

Thanks @mjbvz and @alexandrudima . Just seen the settings.json file.
And I can see the following property,

"editor.multiCursorModifier": "ctrlCmd".

After removing "editor.multiCursorModifier": "ctrlCmd" from settings.json under User settings. it is working as expected.

All 5 comments

A few questions to help investigate:

  1. Does running the go to definition command work?
  2. If you disable all extensions by starting code with the --disable-extensions command line flag, do you still see the issue?

Also, please share some sample code

Following are my answers to your questions

Does running the go to definition command work?

  • Yes, it's working.

If you disable all extensions by starting code with the --disable-extensions command line flag, do you still see the issue?

  • Yes, I'm still seeing the issue after disabled extensions. F12 is working as expected, but not Ctrl + Click.

Example code in Javascript:
Function Definition:
var myfunction = function () {//function definition goes here // ..};

Function Invocation:
myfunction();

In my function invocationmyfunction(), If I useF12 it's navigating to the function definition. But If I use the combination Ctrl + Click (Mouse click) it's not navigating to that definition.

In earlier version I used with this combinations Ctrl + Click, it was working fine, but now it's not working.

Thanks @rajeshsivananth. Since the command works, the issue is probably with the click binding. On linux, I believe that ctrl + click may be bound to add cursor instead. Try setting:

 "editor.multiCursorModifier": "alt",

Here's more info about this behavior: https://code.visualstudio.com/updates/v1_13#_add-multiple-cursors-with-ctrl-cmd-click

@rajeshsivananth as @mjbvz notes, ctrl + click is something the OS eats up in order to move windows by default. So I'm not sure how this stopped working from one VS Code version to another, unless there were some other changes in your environment.

Thanks @mjbvz and @alexandrudima . Just seen the settings.json file.
And I can see the following property,

"editor.multiCursorModifier": "ctrlCmd".

After removing "editor.multiCursorModifier": "ctrlCmd" from settings.json under User settings. it is working as expected.

Was this page helpful?
0 / 5 - 0 ratings