fix: enable key accelerator flags for Windows and Linux (backport: 3-0-x) (#14859)

* Fix Accelerator Flags for Windows and Linux

* Lint fix

* Lint whitespace
This commit is contained in:
trop[bot] 2018-09-28 10:01:28 -07:00 committed by Shelley Vohr
parent 9ab77adc94
commit 5cd24a4e81

View file

@ -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;
}
}