noah-nuebling / mac-mouse-fix

Mac Mouse Fix - Make Your $10 Mouse Better Than an Apple Trackpad!
https://macmousefix.com/
Other
5.41k stars 150 forks source link

Enable go back/forward functionality with mouse buttons 4/5 in Visual Studio Code [enhancement] #456

Open jacobcxdev opened 1 year ago

jacobcxdev commented 1 year ago

Description

Add support for using mouse buttons 4 and 5 to navigate backwards and forwards in the editor, similar to how these buttons work in web browsers.

Rationale

This feature would greatly improve the user experience when using Visual Studio Code, by allowing users to quickly and easily navigate between previously visited locations in the editor without having to use keyboard shortcuts or the mouse scroll wheel. This would be particularly useful for users who prefer to use a mouse for navigation, or for users who have difficulty using keyboard shortcuts.

noah-nuebling commented 1 year ago

Hey @jacobcxdev, thanks for your request! That's a feature I would love to add, but i can't give you a timeframe.

rojnwa commented 1 year ago

@noah-nuebling any updates? haven't had a look in the code, but can't you just stop overriding the buttons if they aren't bound to an action? the default behavior of button 4 and 5 works perfectly in vscode (back/forward). as soon as i disable mac mouse fix, b4/5 starts working again in vscode and as soon as i enable it again, it stops working even though they aren't bound to an action.

nazarEnzo commented 3 months ago

Workaround: Assign keyboard shortcuts to mouse clicks in Mac Mouse Fix and use the same shortcuts in your text editor

In Mac Mouse Fix:

Button 4[click]: Keyboard Shortcut > ⌘← Button 5[click]: Keyboard Shortcut > ⌘→

In Vscode:

Keyboard Shortcuts > navigateBack: ⌘← Keyboard Shortcuts > navigateForward: ⌘→

UPDATE: pick other navigation shortcuts, since the ones i suggested are already reserved for moving the cursor to the start/end of the line