Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

mouse buttons should trigger forward/backward in browsing history #487

Closed
cblgh opened this issue Apr 9, 2017 · 8 comments
Closed

mouse buttons should trigger forward/backward in browsing history #487

cblgh opened this issue Apr 9, 2017 · 8 comments

Comments

@cblgh
Copy link

cblgh commented Apr 9, 2017

I have a Razer Deathadder mouse, and I'm very used to using MB4/MB5 for going backwards and forwards in my browser history. Patchwork has the same kind of buttons, but when I press MB4/MB5 on my mouse nothing happens!

It's not a big thing, but it would feel a lot better navigationally if you could use those buttons in the same way as when browsing in Firefox or Chrome.

@mmckegg
Copy link
Contributor

mmckegg commented Apr 9, 2017

In addition it would be nice if macOS style back/forward page gestures worked.

@fenwick67
Copy link

fenwick67 commented Dec 28, 2017

Some FYIs for anybody wanting to implement these:

At least for Windows the app-command event can be used to grab the back button clicks.

On MacOS the swipe event is used for three-finger swipes.

The lack of support for mouse buttons for linux is a known problem, Brave has encountered it and hasn't solved it yet.

This is basically the code needed for Windows support:

if (process.platform == 'win32'){
  windows.main.on('app-command',function(e,cmd){
    if (cmd === 'browser-backward' && views.canGoBack){
      views.goBack()
    }else if (cmd === 'browser-forward' && views.canGoForward){
      views.goForward()
    }
  })
}

@ThunderFD
Copy link

oh yes please, I was about to open an issue about this. Has someone tried implementing this already?

@kroppt
Copy link
Contributor

kroppt commented Oct 31, 2018

Looks like someone is going at a solution in Electron: electron/electron#15441

@gergelypolonkai
Copy link

Since it bugs me a lot, i opened an MR utilising an external library. In case anyone else is interested in this before the Electron releases their fix 😄

@gergelypolonkai
Copy link

I will keep an eye on that Electron PR; whenever that is released, my solution will be obsolete.

@cblgh
Copy link
Author

cblgh commented Jan 18, 2019

what a ride

@lostmsu
Copy link

lostmsu commented May 9, 2020

This does not seem to be working on Windows 10 with v3.17.7 (probably haven't worked before either).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants