mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add a keyboard shortcut (Command + Q on Mac or Control + Q on other OS) to Quit the app directly. Fixes #12422
This commit is contained in:
parent
f2efc0011a
commit
daeddc4c6f
1 changed files with 5 additions and 0 deletions
|
@ -917,6 +917,11 @@ impl WindowMethods for Window {
|
|||
self.event_queue.borrow_mut().push(WindowEvent::Reload);
|
||||
}
|
||||
}
|
||||
(CMD_OR_CONTROL, Some('q'), _) => {
|
||||
if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() {
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Quit);
|
||||
}
|
||||
}
|
||||
|
||||
_ => {
|
||||
self.platform_handle_key(key, mods);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue