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

Ctrl + Click is not working VS Code Editor(Javascript file) #32143

Closed
rajeshsivananth opened this issue Aug 8, 2017 · 5 comments

Comments

@rajeshsivananth
Copy link

commented Aug 8, 2017

  • 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

@vscodebot vscodebot bot assigned mjbvz Aug 8, 2017

@vscodebot vscodebot bot added the javascript label Aug 8, 2017

@rajeshsivananth rajeshsivananth changed the title Cntrl + Click is not going to the definition in VS code (Javascript file) Ctrl + Click is not working VS Code Editor(Javascript file) Aug 8, 2017

@mjbvz

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2017

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

@rajeshsivananth

This comment has been minimized.

Copy link
Author

commented Aug 9, 2017

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 invocation myfunction(), If I use F12 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.

@mjbvz

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2017

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

@alexandrudima

This comment has been minimized.

Copy link
Member

commented Aug 10, 2017

@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.

@rajeshsivananth

This comment has been minimized.

Copy link
Author

commented Aug 10, 2017

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.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.