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
Closed

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

rajeshsivananth opened this issue Aug 8, 2017 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster linux Issues with VS Code on Linux

Comments

@rajeshsivananth
Copy link

  • 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 JavaScript support issues 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 mjbvz added the info-needed Issue requires more information from poster label Aug 8, 2017
@mjbvz
Copy link
Collaborator

mjbvz 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
Copy link
Author

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
Copy link
Collaborator

mjbvz 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

@mjbvz mjbvz removed the javascript JavaScript support issues label Aug 9, 2017
@alexdima alexdima added the linux Issues with VS Code on Linux label Aug 10, 2017
@alexdima
Copy link
Member

@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
Copy link
Author

rajeshsivananth 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.
Labels
info-needed Issue requires more information from poster linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests

3 participants