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

Allow middle mouse button to be bound in keyboard shortcuts #43794

Closed
NorthboundGames opened this issue Feb 16, 2018 · 22 comments
Closed

Allow middle mouse button to be bound in keyboard shortcuts #43794

NorthboundGames opened this issue Feb 16, 2018 · 22 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality keybindings VS Code keybinding issues

Comments

@NorthboundGames
Copy link

NorthboundGames commented Feb 16, 2018

  • VSCode Version: 1.20.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Change keybinding for a shortcut
  2. Click middle mouse button when prompted for a key combination

(feature request) Not technically a key, but it could be useful if bound like one. Example: middle mouse click to go to definition.

@egamma egamma added the feature-request Request for new features or functionality label Feb 16, 2018
@vscodebot vscodebot bot removed the new release label Feb 20, 2018
@duane
Copy link

duane commented Jun 26, 2018

This would also be highly useful on linux for overriding middle mouse click from paste -> anything else (...even with editor.selectionClipboard is false).

@carstenhag
Copy link

Being able to define all mouse clicks would be nice. Especially for something like James-Yu/LaTeX-Workshop#716

@sk8ersteve
Copy link

This would also be highly useful on linux for overriding middle mouse click from paste -> anything else (...even with editor.selectionClipboard is false).

My understanding is that in Linux, this middle-click functionality is coded into Xorg, so it would not be trivial for VSCode to have this functionality.

My issue is that VSCode currently maps multi-line select to the middle mouse button which behaves very weirdly when I actually try to use it.

@atomi
Copy link

atomi commented Aug 4, 2019

In Linux Mint both Chrome and Firefox are able to bind middle click to page scroll.

@ThiefMaster
Copy link

Is there any extension available right now to use middle click for jumping to the definition? I'm very used to this from pycharm etc..

@jrieken jrieken added the keybindings VS Code keybinding issues label Oct 8, 2019
@adabru
Copy link

adabru commented Oct 17, 2019

@poodle-chowder , I think this is a duplicate of #3130 ?

@git-xbits
Copy link

I really need this functionality too, I'm migrating from Android Studio to VSCode, and I go to defition with middle mouse click, and VSCOde don't have plugins to this or duplicate with ctrl + D.

Please consider to implement this functionality.

@drygiel
Copy link

drygiel commented Nov 8, 2019

This prevents me from using VS Code :( I so much get used to navigate though the code by just clicking on the class names...

@Shahaed
Copy link

Shahaed commented Jan 29, 2020

@XeonG
Copy link

XeonG commented Mar 13, 2020

When will this be added already!?!... it opens up at number of much more easier shortcuts especially with mmb+modifier key.... like commonly used ones like ctrl+shiftf+f12 ...I mean I use 'find all references' all the time, would be so much better bound to mmb+modifier,

@danielsamuels
Copy link

danielsamuels commented Apr 16, 2020

For those of you who are looking for a short term fix for this, I've created an AutoHotkey script which provides middle-click Go To Definition behaviour:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#IfWinActive ahk_exe Code.exe
~MButton::
MouseGetPos, xpos, ypos

if (ypos >= 87) {
    SendInput,{Click}{F12}
}

return

Copy the above contents into a file named vscode-f12-go-to-definition.ahk and run it. You'll see a green H icon in your systray which shows it's running.

@lynxnathan
Copy link

lynxnathan commented May 27, 2020

Tip: you can a use a tool like BetterTouchTool for mouse / touchpad / touchbar on mac:

better touch tool screenshot with two assigned mouse shortcuts to vscode for navigation controls

@chipnertkj
Copy link

do you guys not have a keyboard?

@drygiel
Copy link

drygiel commented Oct 22, 2020

@chipnertkj In all other IDEs I can click on a class name with MMB and navigate to the reference WITHOUT touching a keyboard - using ONE hand only. But this is how it looks in VS Code:

image

@chipnertkj
Copy link

You can just navigate to it without your hand ever leaving the keyboard. Just think about how much time that can save you. I get that it'd be a useful feature for people who aren't used to keyboard navigation and I agree that it indeed should be a feature, but since it doesn't seem like we're getting it anytime soon - why don't you try it out?

@chenasraf
Copy link

chenasraf commented Nov 3, 2020

You can just navigate to it without your hand ever leaving the keyboard. Just think about how much time that can save you. I get that it'd be a useful feature for people who aren't used to keyboard navigation and I agree that it indeed should be a feature, but since it doesn't seem like we're getting it anytime soon - why don't you try it out?

But a lot of us are going through the code with the mouse because we quickly navigate between definition trees. We can't not keep our hands on the keyboard if we didn't have it there to begin with. You're missing the point

@gjsjohnmurray
Copy link
Contributor

@poodle-chowder , I think this is a duplicate of #3130 ?

Thanks @adabru

/duplicate

@eriegz
Copy link

eriegz commented Dec 21, 2020

Hey VS Code employees, could you perhaps have your triage bot include a link to whatever issue this one supposedly duplicates?

@levpaul
Copy link

levpaul commented Dec 29, 2020

@eriegz - it's #3130 which was mentioned above

@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality keybindings VS Code keybinding issues
Projects
None yet
Development

No branches or pull requests