break;
case winui::Core::CoreAcceleratorKeyEventType_SystemKeyDown:
+ // Don't send the Alt + F4 combination to Chrome as this is intended to
+ // shut the metro environment down. Reason we check for Control here is
+ // Windows does not shutdown metro if Ctrl is pressed along with Alt F4.
+ // Other key combinations with Alt F4 shutdown metro.
+ if ((virtual_key == VK_F4) && ((keyboard_flags & ui::EF_ALT_DOWN) &&
+ !(keyboard_flags & ui::EF_CONTROL_DOWN)))
+ return S_OK;
ui_channel_->Send(new MetroViewerHostMsg_KeyDown(virtual_key,
status.RepeatCount,
status.ScanCode,
HRESULT ChromeAppViewAsh::OnEdgeGestureCompleted(
winui::Input::IEdgeGesture* gesture,
winui::Input::IEdgeGestureEventArgs* args) {
- // Swipe from edge gesture (and win+z) is equivalent to pressing F11.
- // TODO(cpu): Make this cleaner for m33.
- ui_channel_->Send(new MetroViewerHostMsg_KeyDown(VK_F11, 1, 0, 0));
- ::Sleep(15);
- ui_channel_->Send(new MetroViewerHostMsg_KeyUp(VK_F11, 1, 0, 0));
+ ui_channel_->Send(new MetroViewerHostMsg_EdgeGesture());
return S_OK;
}