Skip to content

VS Code: Scroll with Middle Click

VS Code Scroll with Middle Click

VS Code introduced a new feature that lets you scroll using the middle mouse button. You can scroll up and down, as well as left and right.

Let’s find out 👇

📹 Prefer a video instead? I got you covered:

Enable Scroll on Middle Click

  1. Press CTRL + , (or CMD + , on macOS) to open the Settings
  2. Search for editor.scrollOnMiddleClick and toggle it on

You can also directly modify your settings.json file by adding the following line:

"editor.scrollOnMiddleClick": true,

Now, when you are in a scrollable area and you press the middle mouse button, a small icon with arrows appears. Then, by moving your mouse slightly in any direction, you can scroll automatically in that direction (up, down, left, and right). The farther you move the cursor from the original point, the faster the scroll.

â„šī¸ It’s good to know that this feature might interfere with other actions or keybinds tied to the middle mouse button.
For example, on Linux, the middle mouse button pastes content from your clipboard. To avoid these conflicts, enable only one of these settings at a time.

Happy coding 💜


Let me know what you think about this article in the comments section below.

If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.   
  

Comments