14

When I right click in the editor, vs code executes whatever menu item the cursor happens to be over. It happens far too fast for me to make my actual choice known.

I have already spent 30 minutes trying to find a solution. If you search for "right click" in the Command Palette, you are told there are no matches. You don't get any hits in the docs, either. Please advise. Thank you.

Malik A. Rumi
  • 1,855
  • 4
  • 25
  • 36
  • While it’s not a “real” solution, it is possible (just like with the context menus of most applications) to _hold_ the right-click button and only release it when you know for sure the cursor is on the right menu item. – Alice M. Feb 06 '23 at 15:05

2 Answers2

12

It has been reported that the situation you mentioned is a bug in the repository on GitHub. It is reported that Visual Studio Code works fine when zoom is disabled.

You can update the following setting to override this behavior:

"editor.mouseWheelZoom": false

Or you can update the mouseWheelZoom setting from the pop-up window by using the shortcut CTRL + , to go to Settings.

Sercan
  • 4,739
  • 3
  • 17
  • 36
  • 1
    Thank you. Not only was your advice correct, fast, and easy to follow, I would **NEVER** have thought to look up 'mouse wheel zoom' for the answer. – Malik A. Rumi Dec 16 '21 at 23:29
  • 7
    Also: Set `window.zoomLevel` to 0 instead of 1. Fixed it for me. – Andrew Jul 29 '22 at 09:55
  • 2
    Reading through that thread, it seems to possibly be an Electron problem (which VSCode was built with), and it may have something to do with the number of items in (height of?) the right click context menu. Some people would disable an extension and it would get fixed, which I'm guessing may be due to reducing the size of the menu. – Andrew Jul 29 '22 at 09:56
  • 2
    @Andrew this fixed me. I had window.zoomLevel setted to -2, lol. – Luis Feb 19 '23 at 15:06
  • 1
    @Andrew Thanks a bunch, the accepted answer was not enough. – Girspoon Mar 31 '23 at 19:19
6

It's crazy, but this is still an issue for Linux users after so many years. Especially, when using a Laptop with touch-pad it makes VSCode frustrating to use. The problem occurs when you use "native" window style (you can tell, because the theme will not be applied to context menus) and have a non-default zoom.

The GitHub issue that @sercan linked to has a few solutions. In order to save you some time, there is basically two things that I found work and make sense:

  1. Set your zoom level to default / 0. In settings.json add: "window.zoomLevel": 0 This works with all window styles, but obviously is not always viable
  2. Change the title bar style from native to custom. In settings.json add: "window.titleBarStyle": "custom" This will change how the title bar but also the context menus look. Setting this, you can zoom in again
mc51
  • 1,883
  • 14
  • 28