back / forward key press events
This commit is contained in:
parent
bda5b56f34
commit
b8f9cedbf4
1 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue