microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.17k stars 28.54k forks source link

Allow customization of mouse shortcuts #3130

Open Tyriar opened 8 years ago

Tyriar commented 8 years ago

Some users would like to be able to customize not just pure keyboard shortcuts but also mouse + modifier ones. These are currently hard coded, for example alt+click to add a selection.

See https://github.com/Microsoft/vscode/issues/3091 for some more context.

hkcoyant commented 7 years ago

i need this to, go to change.org? :joy:

therox commented 7 years ago

Change drag windows with Alt for Kubuntu (16.04): Settings -> System Settings -> Window Management -> Window Behavior -> Window Actions -> Modifier Key -> change to "Meta"

ajoslin103 commented 7 years ago

using the cmd key to add multiple selections is working now for mac !!

thanks to all !!!

oshalygin commented 7 years ago

eh @ajoslin103 that wasn't actually the intent of this issue.

We should try to find a way to customize the interaction, instead of being given a hardcoded default.

For instance, cmd + click would be super useful to Peek as with most other editors.

Reducing mental tax, thats what we should strive for with keyboard shortcuts!

ajoslin103 commented 7 years ago

while I totally agree with you in spirit, this singular issue was the only thing keeping away from vsCode, lo these many moons -- and it took so long to find the problem, locked in an issue at the bottom of a chain (behind a door marked: beware of the leopard!)

I agree that a way to customize mouse+key interaction would be fabulous, I'm still frustrated by the selection extension behavior.

But at least I'm finally here, slowly picking my way through the forest of extensions and options trying to get back to the [nearly] 'thoughtless editing' I'd had with my prior editor.

Please forgive my tunnel vision

Thargarius commented 7 years ago

How this is going ? When can we expect a released of this feature ? I would love to change shortcut like ctrl+maj+mouse for block selection to alt+mouse !

exectails commented 7 years ago

+1, really want to get rid of the "Ctrl+Click => go to definition" binding.

trevordaniels commented 7 years ago

I want to get rid of ctrl click go to definition as well, and instead use it to select the whole word. This is a feature I constantly used in vs and would use it everyday in vs code.

lopugit commented 7 years ago

how is this not out yet....?

oshalygin commented 7 years ago

@lopugit this is an open source project, feel free to contribute to it.

As someone that contributes on a series of projects myself, it doesn't help at all when people post things like "why isn't this in the library?" "why doesn't this exist? It's needed!", etc.

Providing constructive feedback along with +1's for the root issue is what will help drive development.

Don't be entitled, the source code is open, pull your keyboard out and submit a PR if its that urgent.

For the record I'm all for this feature its just annoying to see people demand features for free software.

lopugit commented 7 years ago

@oshalygin

sorry that I sounded entitled, It's now 7am and I've just been up all night working on my own projects, I didn't realise this was open source, I thought it was a microsoft project?

My comment only comes from the perspective of, jeez, ctrl+click not being an editable shortcut? Ya feel?

I am working on a few things to contribute to the open source community, I just wanted to add my thoughts to this feature here, every comment can be seen as good discourse.. kind of..

Idk, I'm super tired, peace ;)

nnmrts commented 7 years ago

@lopugit Well, since we are on GitHub here, yes, this is open source. 😅

BrettMoan commented 7 years ago

@Tyriar I notice this is listed as backlogged, to your knowledge, is there a branch where anyone has begun working on adding "Mouse" bindings as customization options? It seems the conversation for this feature has been going on for a while, so I'm assuming its a fairly complex change.

Tyriar commented 7 years ago

No branch AFAIK. There has been a little movement on this; the editor.multiCursorModifier setting allows you to swap the multi-cursor and follow definition/link modifiers. There is no keybinding.json-like file for mouse bindings though which I imagine the solution to this will look like. I think this is mainly blocked on @alexandrudima freeing up who has many competing priorities.

bluemoehre commented 6 years ago

I would like to use Mouse 4 + 5 (side buttons) for "navigate back" + "navigate forward". Already works in the browser and other IDEs. So please add mouse shortcuts =)

aperrot42 commented 6 years ago

+1

DoCode commented 6 years ago

Is everyone read this feature request??? +1

DoCode commented 6 years ago

Seriously, please add support for mouse buttons in keyboard shortcuts!

jpSimkins commented 6 years ago

It's coming on 2 years now! Why isn't this a feature yet! Please allow us to use mouse buttons in key binding

gazzar commented 6 years ago

I wonder whether it would be easy to add a temporary change to allow column selection in Linux, such that Ctrl+Alt+click (just following the suggestion of krux02) also performed box/column selection in addition to Alt+click, which is blocked by the Linux Window managers? If mouse button customisation is added at some point, this temporary change could then be removed, but in the meantime it would relieve the biggest frustration I have had with using VS Code on Linux.

DoCode commented 6 years ago

How long should we wait for this BASIC feature? Another year? It is a CORE BASIC COMMON feature like ENTER or DELETE? Oh, my god whats going on... People will fly to Mars, and we fighting for mouse keyboard shortcuts. All other editors have this feature on board. But the new, cool kid on the block is behind...

Thargarius commented 6 years ago

I agree, this is a very basic feature, I dont understand whats going on... We NEED this feature

oshalygin commented 6 years ago

You guys realize you're using a completely free tool that you can contribute towards right? I dont think anyone in the community is against a PR with this "basic feature" 📄

@Thargarius @DoCode

jsonMartin commented 6 years ago

If I remember correctly, this issue is caused by Electron, not so much VS Codebase itself. So a fix would require patching the Electron source code methinks =P

On Mon, Dec 4, 2017 at 10:49 AM Oleg Shalygin notifications@github.com wrote:

You guys realize you're using a completely free tool that you can contribute towards right? I dont think anyone in the community is against a PR with this "basic feature" 📄

@Thargarius https://github.com/thargarius @DoCode https://github.com/docode

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode/issues/3130#issuecomment-349064344, or mute the thread https://github.com/notifications/unsubscribe-auth/AD2MVQ9h6MIa7CdtLZcXTrvt5XxYn1-9ks5s9D6ygaJpZM4HdSg8 .

DoCode commented 6 years ago

I'm not a perfect Atom/Electron dev. Anybody here, who can fix or start fixing this issue?

I think here is the Atom pendant.

beisserm commented 6 years ago

+1

first-bridge commented 6 years ago

i'd like to press Mouse2Click (middle mouse button/scroll wheel) to navigate to declaration instead of Ctrl-Mouse1Click

kerosan commented 6 years ago

i'd like to press Mouse2Click (middle mouse button/scroll wheel) to navigate to declaration instead of Ctrl-Mouse1Click

BluishGreenProductions commented 6 years ago

The ability to middle-click to open the definition of a method or variable would be nice, it's something I got used to in the GameMaker IDE.

guido4000 commented 6 years ago

It would be great to have the option to disable the middle mouse button double click paste function.

RayBowman2017b commented 6 years ago

If VSCode had macro capabilities, this feature could probably be added in via a macro.

PLEASE go to issue #4490 and up-vote it (click on the thumbs-up button) and add your support!

https://github.com/Microsoft/vscode/issues/4490

GuyKedem1 commented 6 years ago

I'd like to use the trackpoint on my thinkpad to scroll when pressing ctrl (like middle click emulation, ubnutu)

douglas commented 6 years ago

Is it possible to use shift+command and left button mouse click instead of command+left button mouse click or we need to ship this feature first?

GammaGames commented 6 years ago

I think this would be a nice feature, I would like to bind ctrl+mouse wheel to scroll forward and backward through time

adowdy commented 6 years ago

I think this is what I'm looking for...

I really just want to be able to use the 'back' and 'foward' buttons on my mouse to equate to the keyboard shortcut actions 'Go Back' and 'Go Forward' respectively. It seems right now I cannot assign the mouse buttons to these. I'd even settle for a hardcoded solution so I can jump through my code!

jsonMartin commented 6 years ago

Hey @nerael , totally agree. I've solved this issue by binding my mouse buttons to emit keyboard shortcuts that perform the 'Go Back' and 'Go Forward' actions in VSCode. It's easy to do this in Logitech's software, but there are ways to do this on Windows / OSX even if it is not supported by the device manufacturer.

Note that this is only a personal workaround and software level support would be ideal, but this can work in the meantime.

adowdy commented 6 years ago

@jsonMartin

Thanks... this led me to a workaround. i approximated it this way https://thecrumb.com/2015/06/03/xbindkeys/index.html

EDIT - this was also a very helpful tutorial about configuring xbindkeys https://blog.hanschen.org/2009/10/13/mouse-shortcuts-with-xbindkeys/

My ~/.xbindkeysrc file is:

# VSCODE MOUSE BINDINGS FOR CODE JUMPING
# 'Go Back'
"xte 'keydown Control_L' 'keydown Alt_L' 'key minus' 'keyup Alt_L' 'keyup Control_L'" 
b:8
# 'Go Forward'
"xte 'keydown Control_L' 'keydown Alt_L' 'key equal' 'keyup Alt_L' 'keyup Control_L'" 
b:9

This is because my 'Go Forward' has been bound to ctrl + alt + equals. b:8 and b:9 are keycodes for my mouse buttons for forward and back!

EDIT - in case it wasn't clear, I'm using latest Ubuntu LTS as of this writing, not windows or OSX

ShadowRanger commented 6 years ago

I just want to be able to disable my mouse buttons in Visual Studio Code from doing anything as I use one of them for my push to talk key.

carstenhag commented 6 years ago

So why is there seemingly no answer or progress here? (I have not seen any comment from a collaborator, sorry if that's not true)

Is it an upstream issue of electron? Is it just not an important feature on the Roadmap?

mhh1422 commented 6 years ago

+1

philiiiiiipp commented 6 years ago

Hey @mhh1422 just a friendly reminder that if you are posting on a github issue, everybody subscribed will get an email.

If you have nothing constructive to add but want to increase awareness please use the reactions.

For everyone I spammed with this message, ❤️

lopugit commented 6 years ago

@philiiiiiipp I like knowing how long this is taking though

Nemesis19 commented 6 years ago

+1

DeadByElpy commented 5 years ago

+1

carstenhag commented 5 years ago

@lopugit @Nemesis19 @DeadByElpy

Please add the +1 to the original issue at the top.

You can get notified without commenting by pressing the "Subscribe" button on the top right of this page.

gimoteco commented 5 years ago

This could be useful when you want to bind go back command with back button in mouse, this shortcut is widely used in web browser, and I believe that Visual Studio also has it.

ppfmagno commented 5 years ago

Would be really nice to use "Alt + Scroll Up / Down" to increment / decrement numbers or loop through enums or something like this.

XeonG commented 5 years ago

damn yes we need to able to use mouse buttons in the keybindings.. it would solve a lot of issues like being able to replacing the rubbish shortcuts like { "key": "ctrl+pagedown", "command": "workbench.action.nextEditor" } with ctrl+mousewheel down etc....

...done mousewheel tab switching.. so much better.

please get on this, it's about time already.

jessey-git commented 5 years ago

Hope this task is still on the table. I'd like to modify the SHIFT-ALT-LeftMouse "column select" combo into just ALT-LeftMouse...

joaomcarlos commented 5 years ago

I am switching from JetBrains products because of work and trying to adapt VSCode as much as possible to my previous workflow.

I used alt+leftclick on any highlighted text to get to the QuickFix menu. In the other editor it would be stuff like fix spell check typos, fix missing imports, simplify code, etc. All this actions are buried under the - now massive - right click menu.

Since I use a rollermouse because of disability this becomes harder than normal since now I have to do a wierd movement to reach the same actions.

Having the ability to customize such things would greatly improve my comfort.

I hope someone gets around to this.

Happy holidays!