mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
add reload keyboard shortcut
rename the preference to shell.builtin-key-shortcuts.enabled
This commit is contained in:
parent
053c2aee0a
commit
909f0da3c2
9 changed files with 57 additions and 4 deletions
|
@ -1341,6 +1341,13 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
self.start_shutting_down();
|
||||
}
|
||||
}
|
||||
|
||||
WindowEvent::Reload => {
|
||||
let msg = ConstellationMsg::Reload;
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Sending reload to constellation failed ({}).", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,8 @@ pub enum WindowEvent {
|
|||
Quit,
|
||||
/// Sent when a key input state changes
|
||||
KeyEvent(Key, KeyState, KeyModifiers),
|
||||
/// Sent when Ctr+R/Apple+R is called to reload the current page.
|
||||
Reload,
|
||||
}
|
||||
|
||||
impl Debug for WindowEvent {
|
||||
|
@ -99,6 +101,7 @@ impl Debug for WindowEvent {
|
|||
WindowEvent::ResetZoom => write!(f, "ResetZoom"),
|
||||
WindowEvent::Navigation(..) => write!(f, "Navigation"),
|
||||
WindowEvent::Quit => write!(f, "Quit"),
|
||||
WindowEvent::Reload => write!(f, "Reload"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue