<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">Currently, the <code class="notranslate">accelerator</code> property in <code class="notranslate">MenuItem</code> accepts only one string, therefore it's not possible to register multiple shortucts.</p>
<h3 dir="auto">Proposed Solution</h3>
<p dir="auto">The <code class="notranslate">accelerator</code> property in <code class="notranslate">MenuItem</code> class should accept an array of strings.</p>
<h3 dir="auto">Alternatives Considered</h3>
<p dir="auto">Adding multiple basically the same <code class="notranslate">MenuItem</code>s.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[
        {
          accelerator: 'CmdOrCtrl+L',
          label: 'Toggle Overlay',
          click() {
            appWindow.webContents.send('toggle-overlay');
          },
        },
        {
          accelerator: 'Ctrl+Space',
          label: 'Toggle Overlay',
          click() {
            appWindow.webContents.send('toggle-overlay');
          },
        },
]"><pre class="notranslate"><span class="pl-kos">[</span>
        <span class="pl-kos">{</span>
          <span class="pl-c1">accelerator</span>: <span class="pl-s">'CmdOrCtrl+L'</span><span class="pl-kos">,</span>
          <span class="pl-c1">label</span>: <span class="pl-s">'Toggle Overlay'</span><span class="pl-kos">,</span>
          <span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
            <span class="pl-s1">appWindow</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">send</span><span class="pl-kos">(</span><span class="pl-s">'toggle-overlay'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
          <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-kos">{</span>
          <span class="pl-c1">accelerator</span>: <span class="pl-s">'Ctrl+Space'</span><span class="pl-kos">,</span>
          <span class="pl-c1">label</span>: <span class="pl-s">'Toggle Overlay'</span><span class="pl-kos">,</span>
          <span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
            <span class="pl-s1">appWindow</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">send</span><span class="pl-kos">(</span><span class="pl-s">'toggle-overlay'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
          <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span></pre></div>
<p dir="auto">As mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="71426008" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/1507" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/1507/hovercard" href="https://github.com/electron/electron/issues/1507">#1507</a>, it would be nice to be able to specify accelerator aliases, or multiple accelerators.</p>
<p dir="auto">The most obvious use case is for Zoom In. <code class="notranslate">Command+Plus</code> and <code class="notranslate">Command+=</code> generally both work for zooming in, but there is no way to specify this behavior in Electron.</p>
<p dir="auto">One idea is to specify an array of accelerators, where the first is shown as the menu item's shortcut, and the rest are aliases.</p>
<p dir="auto">For example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ label: 'Zoom In', accelerators: [ 'Command+Plus', 'Command+=' ] }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-c1">label</span>: <span class="pl-s">'Zoom In'</span><span class="pl-kos">,</span> <span class="pl-c1">accelerators</span>: <span class="pl-kos">[</span> <span class="pl-s">'Command+Plus'</span><span class="pl-kos">,</span> <span class="pl-s">'Command+='</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span></pre></div>