Comments (14)
@jlnr currently you can do that by press + LEFT/RIGHT. But I think your suggestion is very useful. Give me a moment 👍
from webpin.
@jlnr in my case they are 8/9
from webpin.
@jlnr could you test current master branch please?
from webpin.
Wow, that was quick :) Right now mkdir build && cd build && cmake ..
is choking on this:
CMake Error at CMakeLists.txt:27 (include):
include could not find load file:
ValaPrecompile
CMake Error at CMakeLists.txt:28 (find_package):
Edit: Never mind, I was missing the cmake-elementary
package.
from webpin.
Back works, forward doesn't.
from webpin.
I've just looked at the source code and I wonder if my mouse is to blame. I had to remap my fifth mouse button to XF86Forward using command-line magic because by default it is mapped to something silly. This mapping works fine throughout elementaryOS, including Epiphany, but maybe it's throwing off the JavaScript button numbers?
Edit: I've connected another mouse and both back (physical button 4) and forward (physical button 5) work. I'm fine with closing this issue and just blaming the broken forward key on my mouse setup.
from webpin.
@jlnr I don't know... I use some Logitech and Dell mouse devices without modifying it. And it works fine in all browsers and other apps like Files
. 🤷♂️
from webpin.
Ah, got it. Mice usually send button 8/9. However, there are also Gdk key constants for Back/Forward navigation (for monstrosities like this - I think I might've owned this one before, I remember having these keys), and that's what I've mapped my mouse button to.
So if I add this in addition to the button_press handler, everything works for me:
web_view.key_press_event.connect ((event) => {
if (event.keyval == Gdk.Key.Back) {
web_view.go_back ();
return true;
} else if (event.keyval == Gdk.Key.Forward) {
web_view.go_forward ();
return true;
}
return base.key_press_event (event);
});
Obviously I should also reconsider the way I've mapped my mouse button 😅, but as the rest of elementary apparently understands the navigation Gdk.Keys, I would still suggest adding the above code.
from webpin.
let me try it...
from webpin.
@jlnr Gdk.Key.Back
doesn't work. Its value is 269025062 😕
I guess it means keyboard key and not mouse button
from webpin.
Yes, I had to set the key_press_event handler in addition to button_press_event (from your commit).
from webpin.
I see.. good point! I pushed it into current master
from webpin.
Great, thanks!
from webpin.
@jlnr thank you for your support! New release is waiting for approve...
from webpin.
Related Issues (20)
- App crashes when clicking login on Apple Music
- Add LICENSE file HOT 1
- Browser outdated HOT 1
- don't allow to save pics from the apps.
- Window class don't match on DockbarX HOT 1
- Enable navigation gestures
- Display Oddities HOT 1
- 💡: Need a spell check
- Taking too much CPU and RAM while playing music HOT 1
- Option for flat styled windows
- Download notifications
- Crashes when user presses the numeral zero in any part of the app or webapps on elementary OS 6 Daily
- Webpin and icloud.com
- Flickering of live mjpeg feed. HOT 2
- Apple Music error: "undefined is not an object (evaluating 'this._session.isFairplay')"
- create automatically icon and name from url HOT 1
- Package as Flatpak for elementary OS 6 HOT 12
- Add your stripe key to appdata
- ElementaryOS HOT 1
- Please make a flatpak app for Elementary OS 6 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpin.