Closed
Description
- Electron version:1.3.1
- Operating system:Fedora 24
It seems Event: ‘app-command’ is only available in Windows. Would be possible to add Linux support of it?
Reacted by James Wheare, EP, Ezequiel Moreno, Varga László, Mohamad Ramadan, Přemek Vyhnal, Dirk-Jan Wassink, Mounier Florian, eiabea, Devon Yang and 33 more
Activity
zcbenz commentedon Aug 29, 2016
There is no
app-commandon Linux, the buttons on mouses are translated to key events depending on your machine's configuration. Can you try whether the button works in Chrome browser? And if it is working can you use thexevtool to get what key event the button is translated to?MarshallOfSound commentedon Aug 29, 2016
GPMDP uses a native node module for forward and back mouse buttons on linux that we made ourselves.
https://github.com/jostrander/mouse-forward-back
Does this fulfill your needs?
Pablohn26 commentedon Aug 29, 2016
I have run
xev -event buttonwith next outputbutton 9 is forward button and button 8 is back button.
And yes, it is working on Google Chrome and chromium.
[-]Request: back mouse button in Linux [/-][+]Support back mouse button[/+]jonathansampson commentedon Apr 2, 2017
I came to the same results as @Pablohn26.
brave/browser-laptop#5620 (comment)
jaewonha commentedon Mar 15, 2018
came here from vs code not supporting back key navigation...
please someone take care of this issue...!
verner-lall commentedon Apr 25, 2018
Almost 2 years for something seemingly simple. Please?
SocksPls commentedon Apr 25, 2018
Anything? This is the only thing stopping me using brave as my main browser on all of my computers.
premek commentedon Apr 25, 2018
How should this be implemented?
Also, how about OSX?
Aetherall commentedon Jul 29, 2018
I am not an electron developer so maybe I am saying pure nonsense :)
but maybe it is solvable by the adapter paradigm,
where there is an "OSX mouse event adapter", "Linux mouse event adapter" and "Windows mouse event adapter" and the correct one is chosen on compile time?
coreybruce commentedon Sep 11, 2018
it already is supported in Linux and it's really annoying, I keep accidentally pressing the button on my mouse, how do I disable the back button?!
1 remaining item
coreybruce commentedon Sep 24, 2018
If you guys want to disable the back button from working on your web page in electron just use this script in the body
onLoad="noBack();" onpageshow="if (event.persisted) noBack();"
e.g
jonathansampson commentedon Sep 30, 2018
@coreybruce Your code lacks the function itself. Is
noBackalready defined as a global somewhere in Electron? Also, why would you want to do this?coreybruce commentedon Oct 1, 2018
I have a gaming application called Gamer World and I it is really annoying when I accidentally press the back button my mouse in the middle of a game and it goes back a page.
here is a link to the Gitlab repo
https://gitlab.com/coreybruce/Gamerworld-App
britalmeida commentedon Oct 7, 2018
Can you communicate better and make it easier for software using electron to setup the navigate back/forwards correctly?
Currently, neither VSCode or Spotify on Linux have the functionality working.
JoseFMP commentedon Oct 20, 2018
As @britalmeida mentioned. Why wouldn't this be used in VSCode on Linux? Would be great to propagate the achievement :)
coreybruce commentedon Oct 20, 2018
What does VSCode have to do with Electron tho @JoseFMP?
codebytere commentedon Oct 20, 2018
@coreybruce: vscode is an electron app 😉
coreybruce commentedon Oct 21, 2018
@codebytere Oh right I see
fatmalama commentedon Apr 17, 2019
this is crazy. why is there an API difference for something so basic between windows and linux and why should each app implement back and forward specifically for linux and not share code with windows and macos?
Yanpas commentedon Apr 26, 2019
Seems like mac users are still lacking this.
https://electronjs.org/docs/api/browser-window#event-app-command-windows-linux
Why not introduce separate event 'navigation' or 'crossplatform-command' event? This is VERY ugly workaround.
luxalpa commentedon Dec 8, 2019
Isn't electron supposed to make cross platform development easier? Then why suddenly separate this behavior between platforms?
RattlingAmigo commentedon Oct 17, 2020
With some javascript and html, we can make like browsers button (<) (>) for every platform.
Making below lines of the code on top of the page, with some css would be the work around.
Code:
Tejeev commentedon Feb 5, 2025
Still an issue, and no, uerland does not have a fix for each electron app. Please fix this.. It's honestly kind of ridiculous.