Accelerators and sendInputEvent
<p>According to the <a href="https://github.com/atom/electron/blob/master/docs/api/accelerator.md" rel="nofollow">Accelerator</a> documentation, I should be able to send key commands like <code>Ctrl+A</code> and <code>Return</code>.</p>

<p>Using the following, I can send key commands one at a time:</p>

<pre><code>//ch = current key command, like 'a' or 'Backspace'
webView.sendInputEvent({
  type: 'keyDown',
  keyCode: ch
});

webView.sendInputEvent({
  type: 'char',
  keyCode: ch
});

webView.sendInputEvent({
  type: 'keyUp',
  keyCode: ch
});
</code></pre>

<p>This works fine for ordinary letter keypresses, and even <code>Backspace</code>, but the above won't honor modifier combinations like <code>Ctrl+A</code>, or even some single modifiers like <code>Return</code> or <code>Enter</code>.  If I enter text on a textarea and then send <code>Return</code>, I would expect a newline to be added to the textarea.</p>

<p>From the Electron documentation (emphasis mine):</p>

<blockquote>
  <p>keyCode String (required) - The character that will be sent as the keyboard event. Should only use the <strong>valid key codes in Accelerator</strong>.</p>
</blockquote>

<p>It would seem by that documentation, the newline should get added.</p>

<p>Is that expectation correct?  If so, what am I doing wrong?</p>