From 0e1365fc94732e76c49ff55c6e0911c1f54e668e Mon Sep 17 00:00:00 2001 From: Troy Date: Fri, 28 Sep 2018 04:59:00 -0700 Subject: [PATCH] fix: enable key accelerator flags for Windows and Linux (#14830) * Fix Accelerator Flags for Windows and Linux * Lint fix * Lint whitespace --- atom/browser/ui/accelerator_util.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/browser/ui/accelerator_util.cc b/atom/browser/ui/accelerator_util.cc index 63ea1489467c..8a8067c5a788 100644 --- a/atom/browser/ui/accelerator_util.cc +++ b/atom/browser/ui/accelerator_util.cc @@ -91,7 +91,9 @@ bool TriggerAcceleratorTableCommand(AcceleratorTable* table, if (base::ContainsKey(*table, accelerator)) { const accelerator_util::MenuItem& item = (*table)[accelerator]; if (item.model->IsEnabledAt(item.position)) { - item.model->ActivatedAt(item.position); + const auto event_flags = + accelerator.MaskOutKeyEventFlags(accelerator.modifiers()); + item.model->ActivatedAt(item.position, event_flags); return true; } }