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

Request: Additional hotkey for history navigation #492

Closed
Dgc2002 opened this issue Jul 25, 2017 · 9 comments
Closed

Request: Additional hotkey for history navigation #492

Dgc2002 opened this issue Jul 25, 2017 · 9 comments

Comments

@Dgc2002
Copy link

Dgc2002 commented Jul 25, 2017

Currently in order to go forwards/backwards in the navigation history we need to use the arrows in the top bar of the GUI:

image

In previous versions it was possible to use backspace to navigate backwards, but this is no longer the case. Using the forward/backward buttons found on many mice would be desirable as well.

@bastimeyer
Copy link
Member

Sorry for the late response, I haven't had time yesterday to answer.

To go back and forth in the browsing history, you can use the Alt+Left / Alt+Right hotkeys.

The forward and backward mouse buttons can't be used, because they are officially not part of the DOM mouse events specification and Chromium (and NW.js) doesn't use them, which means that they can't be used here. See #382 or the other linked threads...
Btw, the Spotify desktop client also has the same problem, because it is based on Chromium as well.

The backspace button has been changed in one of the recent Chromium versions and it doesn't have its go-back action anymore:
https://www.independent.co.uk/life-style/gadgets-and-tech/news/google-chrome-stop-backspace-being-as-back-button-saving-people-from-accidentally-deleting-a7038281.html
This could be re-added here, but I don't think that it would be a wise decision. Going one step back by pressing backspace is an unexpected behavior IMO.

@Dgc2002
Copy link
Author

Dgc2002 commented Jul 26, 2017

Whoops, sorry I searched the issues for all the wrong keywords apparently.

I remember backspace being removed in Chromium but I'd forgotten that I added an extension to re-add the functionality. The alt combinations are useful but I think the real strength of the backspace behavior was just the one handed, one key interface. Alt + arrow keys either requires two hands(left alt) or one hand in a really awkward position(right alt).

This also requires moving your hand off the mouse which is used for most other interactions in the GUI at the moment. While it's obviously a small inconvenience in the grand scheme of things, it's a general interface annoyance IMO.

Regarding the mouse events you linked. It notes that additional buttons are represented as a bit mask. 4 represents what most people call mouse 3(middle button.) Wouldn't 8 and 16 be mouse 4 and 5, which are the standard forward/backward navigation buttons? Otherwise it seems kind of strange to even mention that there. Though, I'm unfamiliar with working in the CEF.

@bastimeyer
Copy link
Member

bastimeyer commented Jul 26, 2017

Chromium simply doesn't use mouse buttons 4+5. You can check it yourself: open Chromium's dev tools, set event breakpoints for all mouse button related DOM events (in the "Sources" tab) and try to use mouse button 4 or 5. It's unsupported, unfortunately.
The Chromium Extension API included in NW.js also doesn't allow listening to these buttons:
https://developer.chrome.com/extensions/input_ime#type-MouseButton
So neither DOM events, nor CE input events can be used. NW.js also doesn't provide any additional mouse API.

Regarding the Alt+arrow hotkeys, AFAIK, these are the only default hotkeys for navigating the browsing history, which is the reason why they were added here. I understand that it's an annoyance that you need both hands, but re-adding the backspace function that was deliberately removed by the Chromium devs (for good reasons) doesn't seem like a good idea to me.

@moznr
Copy link

moznr commented Jul 30, 2017

This is something that annoyed me too, but as a workaround I just use an autohotkey script.

#IfWinActive Streamlink Twitch GUI

XButton1::Send, !{Left}
XButton2::Send, !{Right}

Makes your mouse side buttons act as Alt+left / Alt+right only when Streamlink Twitch GUI is the active window.

@bastimeyer
Copy link
Member

Closing this, since there's nothing which can be done here to add mouse 4+5 button actions...

@bastimeyer
Copy link
Member

Reopening the thread since this seems to be finally available in Chromium 67:
https://www.chromestatus.com/features/5088301178421248

Chromium 67 is still in the "dev" channel, which means that it is not included in any NW.js release yet. The next Chromium release channel shift is in one or two weeks.
https://www.chromestatus.com/features/schedule

The NW.js releases usually happen on the same day as the Chromium releases...
https://nwjs.io/blog/

@Dgc2002
Copy link
Author

Dgc2002 commented Apr 18, 2018

Oh baby. Chrome has a habit of teasing me with 'next version' features but this is something else!

Thanks for keeping this request in mind!

@bastimeyer
Copy link
Member

It's been requested many times before (#382, #242, #180, #85)...
I was just browsing the new features of Chromium because I'm intending to upgrade to a more recent NW.js version in the next release, so yeah, ofc I'll reopen one of these threads.

This Chromium feature will finally benefit all NW.js-, Electron- or regular Chromium embedded framework applications like Spotify, etc. Just took them a few years 😄

bastimeyer added a commit that referenced this issue May 7, 2018
@bastimeyer
Copy link
Member

NW.js 0.31.0-beta.1 has been released today with Chromium 67.

You can build the app from the nwjs-0.31 branch and test the changes.
https://github.com/streamlink/streamlink-twitch-gui/blob/master/CONTRIBUTING.md#developing-and-building
The branch will be merged into master once NW.js 0.31 has been fully released.

bastimeyer added a commit that referenced this issue Nov 1, 2018
bastimeyer added a commit that referenced this issue Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants