<p dir="auto">I cannot find a way currently to check if the keyboard focus is within devtools of a window or not. My use case is that I want to treat some actions from the menu specially, when focus is in dev tools.</p>
<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>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>4.1.1</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>windows7</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>:
<ul dir="auto">
<li>none</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">load flash plugin and no exception</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31089228/55221066-a7063880-5243-11e9-9503-6822310ca3c7.png"><img src="https://user-images.githubusercontent.com/31089228/55221066-a7063880-5243-11e9-9503-6822310ca3c7.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">in win7</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const flashPath = app.getPath('pepperFlashSystemPlugin'); // error
if (flashPath &amp;&amp; ['dll', 'so', 'plugin'].forEach(item =&gt; flashPath.endsWith(item))) {
      app.commandLine.appendSwitch('ppapi-flash-path', flashPath);
}"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">flashPath</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getPath</span><span class="pl-kos">(</span><span class="pl-s">'pepperFlashSystemPlugin'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// error</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">flashPath</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-kos">[</span><span class="pl-s">'dll'</span><span class="pl-kos">,</span> <span class="pl-s">'so'</span><span class="pl-kos">,</span> <span class="pl-s">'plugin'</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-s1">item</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">flashPath</span><span class="pl-kos">.</span><span class="pl-en">endsWith</span><span class="pl-kos">(</span><span class="pl-s1">item</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-c1">commandLine</span><span class="pl-kos">.</span><span class="pl-en">appendSwitch</span><span class="pl-kos">(</span><span class="pl-s">'ppapi-flash-path'</span><span class="pl-kos">,</span> <span class="pl-s1">flashPath</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31089228/55221066-a7063880-5243-11e9-9503-6822310ca3c7.png"><img src="https://user-images.githubusercontent.com/31089228/55221066-a7063880-5243-11e9-9503-6822310ca3c7.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">none</p>