Vscode: "Alt + click to follow link" should be "Ctrl + Alt..." on Ubuntu

Created on 21 Oct 2017  Â·  15Comments  Â·  Source: microsoft/vscode

  • VSCode Version: 1.17.2
  • OS Version: Ubuntu 16.04

Steps to Reproduce:

  1. Hover cursor over a link in the console
  2. Tooltip shows "Alt + click to follow link"
  3. Tooltip should should "Ctrl + Alt + click to follow link"


Reproduces without extensions: Yes

debug debug-console

Most helpful comment

I agree with @anchepiece - this askubuntu answer alludes to the location of this setting on ubuntu but I can see it being all over the place based on window manager and linux variant.

All 15 comments

@guyellis Can you confirm that you have "editor.multiCursorModifier": "ctrlCmd" set in your User Settings file?

I have the same setting and am seeing the same behavior, however with the default setting "editor.multiCursorModifier": "alt", you should get the correct link opening tooltip and behavior "Ctrl + click to follow link"

Help: can someone on a mac confirm that with "editor.multiCursorModifier": "ctrlCmd" in settings, Cmd + Alt + click is required and Alt + click does not work?

Help: How do translation keys work in i18n/Transifex? Is it acceptable practice to add or modify translation keys?

I thought this issue was about the debug console

  1. Hover cursor over a link in the console

@anchepiece Yes - that is set in the User Settings file:

    "editor.multiCursorModifier": "ctrlCmd",

If I change that to "alt" then the tooltip changes to "Ctrl + Click to follow link" - and Ctrl + Click works as expected.

If I change it back to "ctrlCmd" then the tooltip changes to "Alt + Click to follow link" - and Alt + Click does not work. However, Ctrl + Alt + Click does work.

@alexandrudima - I should have said Terminal.

If I understand correctly the issue is that the terminal does not respect "editor.multiCursorModifier"configuration. Forwarding to @Tyriar

Hello have been their before the end of this

[email protected]


From: Isidor Nikolic notifications@github.com
Sent: Tuesday, October 24, 2017 3:37:33 AM
To: Microsoft/vscode
Cc: Subscribed
Subject: Re: [Microsoft/vscode] "Alt + click to follow link" should be "Ctrl + Alt..." on Ubuntu (#36683)

If I understand correctly the issue is that the terminal does not respect "editor.multiCursorModifier"configuration. Forwarding to @Tyriarhttps://github.com/tyriar

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vscode/issues/36683#issuecomment-338901724, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcOEgZ5D_OeW9HmI51tExzFj-4S9O6tQks5svZO8gaJpZM4QBk77.

We have links in various places in our UI, in the editor, in the integrated terminal, and in the debug console.

I can speak about links in the editor. The editor mostly identifies http, https and file links, besides some links to relative files in HTML, etc. e.g.:

// http://www.yahoo.com
// file:///Users/alex/src/vscode-master/src/vs/editor/common/viewModel/splitLinesCollection.ts
// file:///Users/alex/src/vscode-master/src/vs/editor/common/viewModel/viewEventHandler.ts

When leaving "editor.multiCursorModifier": "alt" (the default)

  • multiple cursors can be added via alt+clicking
  • therefore (since the alt is taken by multicursor gestures), links can be opened via ctrl+clicking.
  • when opening http or https links, they will be opened in the OS configured browser
  • when opening file links, ctrl+clicking will open the file in the same tab group as the current file
  • that's why there exists ctrl+alt+click which will open the file in the next tab group relative to the current file.

When changing "editor.multiCursorModifier": "ctrlCmd" (your case)

  • multiple cursors can be added via ctrl+clicking
  • therefore (since the ctrl is taken by multicursor gestures), links can be opened via alt+clicking
  • AFAIK Ubuntu suppresses alt+clicking from reaching apps by default and uses that for moving windows or something. This can be changed via some command line magic, that should be easily findable.
  • that's why alt+clicking will appear to not be working (because we don't get the events)
  • similar to above, there also exists ctrl+alt+click which will open the file in the next tab group relative to the current file. In http or https links, this will not make any difference, but this modifier combo + clicking makes it through from Ubuntu.

Sorry for the long explanation:
TL;DR: Some Linux desktop environments suppress alt+clicking for window management gestures (end user configurable). We don't know when that happens, and we always render what we expect the user gesture to be. As a workaround we could render both variants, i.e. "Press alt+click to open link, Press ctrl+alt+click to open link to the side", but I think that would cause UX nausea to all users not using such a Linux desktop environment.

Cool

Thanks @alexandrudima for that awesome explanation!

For me the problem is solved. When I see "Alt + Click" in the terminal I know that I need to do "Ctrl + Alt + Click"

My reason for creating this ticket was because I thought it was a trivial mistake in the text string that labeled the tooltip that would be easy to fix. It turns out to be far more complicated than I thought and involves both OS and VSCode configurations.

From the "new release" tag that @chrmarti just added it looks like you might look further into this.

From my perspective I'm fine if this ticket is closed as "won't fix" because of the vagaries of configurations. If I can help further please let me know.

Thanks for looking into this and the awesome work that you guys are doing on VSCode!

@alexandrudima the long explanation is very much appreciated. As stated in https://github.com/Microsoft/vscode/issues/34710 there is users and myself will just have to know to append Ctrl/Cmd to the existing shortcut command.

There may be a way to detect alt+click usage at the OS level that I'm not aware of, but I think the current way is acceptable.

If you have any idea for an easy way for us to find out on our side that alt+clicking is suppressed by the desktop environment / OS, I'd be happy to include some code which renders ctrl+alt+click instead of alt+click.

Generally I think you'd have to base it on the current window manager running. In most cases, settings will be stored in ~/.config (in the user's home directory)

For Xfce for example, you can find the actual setting you can change called easy_click in the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
<property name="easy_click" type="string" value="Alt"/>

I really think there's too much variation to be useful.

I agree with @anchepiece - this askubuntu answer alludes to the location of this setting on ubuntu but I can see it being all over the place based on window manager and linux variant.

We typically close these issues off in favor of https://github.com/Microsoft/vscode/issues/3130; allowing general support for customizing keybindings.

@Tyriar I'm fine if you close this.

I'll close this off, please reopen if you disagree @alexandrudima

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shanalikhan picture shanalikhan  Â·  3Comments

v-pavanp picture v-pavanp  Â·  3Comments

biij5698 picture biij5698  Â·  3Comments

curtw picture curtw  Â·  3Comments

NikosEfthias picture NikosEfthias  Â·  3Comments