From b8f9cedbf46c667e809ce686bad502985b0dde0a Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Sun, 11 Feb 2018 13:49:17 +0100 Subject: [PATCH] back / forward key press events --- src/Widgets/Browser.vala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Widgets/Browser.vala b/src/Widgets/Browser.vala index 1ec719e..62d09e2 100644 --- a/src/Widgets/Browser.vala +++ b/src/Widgets/Browser.vala @@ -146,6 +146,17 @@ namespace Webpin.Widgets { } return base.button_press_event (event); }); + + 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); + }); } } }