<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 an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<p dir="auto">This is incredibly similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="759576978" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/26888" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/26888/hovercard" href="https://github.com/electron/electron/issues/26888">#26888</a> , but IMHO it cannot be a 100% duplicate since according to the bisect the last known good version is <code class="notranslate">3.1.13</code> and the first known bad version is <code class="notranslate">4.0.0-beta.1.</code>, whereas the other one has a different timeline. Also, this one is on the mac, while the other one is on Windows.</p>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li><code class="notranslate">4.0.0-beta.1.</code> and above</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.15.7</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li><code class="notranslate">3.1.13</code></li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<ul dir="auto">
<li>When using a keyboard layout like <code class="notranslate">Spanish - ISO</code> on macOS, <code class="notranslate">Cmd+Shift+7</code> in an accelerator should be rendered as <code class="notranslate">Cmd+Shift+7</code> or as <code class="notranslate">Cmd+/</code>. Here is a screenshot of the Spanish - ISO keyboard layout. As you can see, <code class="notranslate">Shift+7</code> on the <code class="notranslate">Spanish - ISO</code> keyboard layout produces <code class="notranslate">/</code> and not <code class="notranslate">&amp;</code> (like on the US keyboard layout):<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5047891/101653127-4d599800-3a3f-11eb-9753-93a3c173f9b1.png"><img src="https://user-images.githubusercontent.com/5047891/101653127-4d599800-3a3f-11eb-9753-93a3c173f9b1.png" alt="image" style="max-width: 100%;"></a></li>
</ul>
<h3 dir="auto">Actual Behavior</h3>
<ul dir="auto">
<li>Since Electron <code class="notranslate">4.x</code>, <code class="notranslate">Cmd+Shift+7</code> is always rendered as <code class="notranslate">Cmd+&amp;</code> (or for a while as <code class="notranslate">Cmd+Shift+&amp;</code>?)  which is only correct for keyboard layouts where <code class="notranslate">Shift+7</code> produces <code class="notranslate">&amp;</code>, such as the US keyboard layout, but is incorrect and misleading for any other keyboard layout.</li>
</ul>
<h3 dir="auto">To Reproduce</h3>
<ul dir="auto">
<li>Electron Fiddle that uses <code class="notranslate">cmd+shift+7</code> as an accelerator: <a href="https://gist.github.com/f9dd95b576133c293fe7ad9a5fccb154">https://gist.github.com/f9dd95b576133c293fe7ad9a5fccb154</a></li>
<li>Switch the keyboard layout to <code class="notranslate">Spanish - ISO</code> on macOS</li>
</ul>
<p dir="auto">relevant code snippet:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  const template = [
    {
      label: 'Edit',
      submenu: [
        { label: 'Test', accelerator: 'Cmd+Shift+7' },
      ]
    }
  ]

  const menu = Menu.buildFromTemplate(template)
  Menu.setApplicationMenu(menu)"><pre class="notranslate"><code class="notranslate">  const template = [
    {
      label: 'Edit',
      submenu: [
        { label: 'Test', accelerator: 'Cmd+Shift+7' },
      ]
    }
  ]

  const menu = Menu.buildFromTemplate(template)
  Menu.setApplicationMenu(menu)
</code></pre></div>
<h3 dir="auto">Screenshots</h3>
<ul dir="auto">
<li><code class="notranslate">3.1.13</code> (last known good version):<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5047891/101653562-bb05c400-3a3f-11eb-93d4-ae27592911e7.png"><img src="https://user-images.githubusercontent.com/5047891/101653562-bb05c400-3a3f-11eb-93d4-ae27592911e7.png" alt="image" style="max-width: 100%;"></a></li>
<li><code class="notranslate">4.0.0-beta.1</code> (first bad version):<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5047891/101653670-db358300-3a3f-11eb-82a1-63cd187508d9.png"><img src="https://user-images.githubusercontent.com/5047891/101653670-db358300-3a3f-11eb-82a1-63cd187508d9.png" alt="image" style="max-width: 100%;"></a></li>
<li><code class="notranslate">12.0.0-beta.7</code> (latest version):<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5047891/101653799-04eeaa00-3a40-11eb-93df-773a46f73934.png"><img src="https://user-images.githubusercontent.com/5047891/101653799-04eeaa00-3a40-11eb-93df-773a46f73934.png" alt="image" style="max-width: 100%;"></a></li>
</ul>
<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li>As I mentioned, this is incredibly similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="759576978" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/26888" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/26888/hovercard" href="https://github.com/electron/electron/issues/26888">#26888</a> but appears to have been introduced one version later in Electron</li>
</ul>
<p dir="auto">This is my simple code in index.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="globalShortcut.register(&quot;CmdOrCtrl+q&quot;, () =&gt; {
            app.isQuiting = true;
            app.quit();
 })
"><pre class="notranslate"><code class="notranslate">globalShortcut.register("CmdOrCtrl+q", () =&gt; {
            app.isQuiting = true;
            app.quit();
 })

</code></pre></div>
<p dir="auto">This works fine. But when used via an azerty keyboard, CMD + A is triggering the actions inside this block.</p>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>8</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Mac 10.15.7</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">CMD + A should select all</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">CMD + A is triggering events for CMD + Q</p>