Shortcuts for dialog options?


#1

Hey there,

I’m building an editor for our narrative game scripting language.

When closing a file with unsaved changes, I have the usual dialog that pops up with “cancel”, “don’t save” and “save”. On Mac, I’m used to being able to use the shortcut CMD-D in native apps to choose “don’t save”.

What would be the best way of going about implementing that in Electron? I’m using the standard dialog.showMessageBox.

Thanks!


#2

Related discussion: https://github.com/atom/atom/issues/2928