feat(window): bind hotkey to trigger capture event

This commit is contained in:
OJ Kwon 2018-03-16 10:01:33 -07:00
parent 7b0beedf3d
commit ee637dc26e
No known key found for this signature in database
GPG key ID: 6C23A45602A44DA6

View file

@ -1230,6 +1230,9 @@ impl WindowMethods for Window {
self.event_queue.borrow_mut().push(WindowEvent::Quit); self.event_queue.borrow_mut().push(WindowEvent::Quit);
} }
} }
(_, Some('3'), _) => if mods ^ KeyModifiers::CONTROL == KeyModifiers::SHIFT {
self.event_queue.borrow_mut().push(WindowEvent::CaptureWebRender);
}
(KeyModifiers::CONTROL, None, Key::F10) => { (KeyModifiers::CONTROL, None, Key::F10) => {
let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::RenderTargetDebug); let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::RenderTargetDebug);
self.event_queue.borrow_mut().push(event); self.event_queue.borrow_mut().push(event);