function shouldCaptureKeyEvent(event) {
  if (event.metaKey) {
    return false;
  }
  return document.activeElement === document.body;
}
Returns whether we should capture this keyboard event for keyboard shortcuts.
@param {Event} event Event object.
@returns {boolean} Whether the key event should be captured.