Arne
Arne

Reputation: 8481

How do I remap the `Alt+Click` action in visual studio code?

according to the documentation here I can add multiple cursors in visual studio code by using alt+Click in the editor. Sadly alt+drag is already used by the window manager to move the window around, so visual-studio-code does not get any key events. So how do I change that keyboard configuration in visual studio code? I could not find anything in the default key combinations file.

I am not looking for solution that changes my window manager, I really like that behavior and use it very frequently already for a very long time.

Upvotes: 30

Views: 17826

Answers (4)

user1123236
user1123236

Reputation: 11

Toggle multi-cursor Modifier solves the problem, but if you copy the code and paste somewhere(i.e. onenote) highlights are removed.

Upvotes: 0

Francesco B.
Francesco B.

Reputation: 3097

Go to the Command Palette using Ctrl+Shift+P or clicking into the search bar to the top and then again on "Show and Run Commands"

enter image description here

Type "Toggle multi" and click on the result "Toggle Multi-Cursor Modifier":

enter image description here

My VS Code version is 1.93.1

Upvotes: 1

The easiest way in my opinion is:
From the top-level menu, click on

Selection -> Switch to Ctrl+Click for Multi-Cursor

Then you can use Ctrl+Click rather than Alt+Click.

You can see where this is in this screenshot: You can see where is this in this screenshot

My VSCode version is 1.24.1

Upvotes: 79

DAXaholic
DAXaholic

Reputation: 35338

There is currently no way to do this but already an open issue on GitHub which addresses that.

Upvotes: 7

Related Questions