<p dir="auto">I would like to have keyboard shortcuts on close dialog to chose options<br>
S - save<br>
N - dont save<br>
C - cancel</p>
<p dir="auto">Using Atom 0.19.5 on Windows pressing either escape or the little X in the dialog corner, I am getting "0" returned as result, as if the user was pressing the primary button. I would expect undefined or null.</p>
<p dir="auto">To reproduce just run Atom hello world and on startup do this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var result = dialog.showMessageBox({
  type: 'info',
  message: 'message',
  buttons: ['Yes', 'No']
});

console.log(result);"><pre class="notranslate"><code class="notranslate">var result = dialog.showMessageBox({
  type: 'info',
  message: 'message',
  buttons: ['Yes', 'No']
});

console.log(result);
</code></pre></div>
<p dir="auto">Then just press escape or the X in the dialog title.</p>