mirror of
https://github.com/servo/servo.git
synced 2025-09-01 02:28:21 +01:00
Auto merge of #11735 - mrmiywj:reload-page-shortcut, r=jdm
add reload keyboard shortcut <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11686 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because this cannot be automated tested. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11735) <!-- Reviewable:end -->
This commit is contained in:
commit
eeed5b6ec2
9 changed files with 57 additions and 4 deletions
|
@ -822,7 +822,7 @@ impl WindowMethods for Window {
|
|||
}
|
||||
|
||||
(NONE, Key::Escape) => {
|
||||
if let Some(true) = prefs::get_pref("shell.quit-on-escape.enabled").as_boolean() {
|
||||
if let Some(true) = prefs::get_pref("shell.builtin-key-shortcuts.enabled").as_boolean() {
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Quit);
|
||||
}
|
||||
}
|
||||
|
@ -864,6 +864,11 @@ impl WindowMethods for Window {
|
|||
(NONE, Key::Right) => {
|
||||
self.scroll_window(-LINE_HEIGHT, 0.0, TouchEventType::Move);
|
||||
}
|
||||
(CMD_OR_CONTROL, Key::R) => {
|
||||
if let Some(true) = prefs::get_pref("shell.builtin-key-shortcuts.enabled").as_boolean() {
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Reload);
|
||||
}
|
||||
}
|
||||
|
||||
_ => {
|
||||
self.platform_handle_key(key, mods);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue