rhysd / Shiba

Rich markdown live preview app with linter
772 stars 57 forks source link

Use CommandOrControl for Quit App menu item #32

Closed dogancelik closed 8 years ago

dogancelik commented 8 years ago

This change will allow Linux and Windows users to quit Shiba with Ctrl + Q.

This change will not affect Mac users.

CommandOrControl setting is available in Electron keyboard shortcuts docs

rhysd commented 8 years ago

Thanks, but Windows already has a shortcut to close a window Alt+F4. Linux desktop environments also have its own shortcut to close window. Is it worth adding a new shortcut to Linux and Windows? Cmd+Q was added to OS X because Cmd+Q is a standard way to close a window in OS X.

rhysd commented 8 years ago

I just remembered that QuitApp action already exist for customization. I think you can assign Ctrl+q for it to config.yml

shortcuts:
    "ctrl+q": "QuitApp"
dogancelik commented 8 years ago

Alt+F4 is a hard to reach shortcut (the distance between keys are far greater than Ctrl+Q) that's why many popular programs in Windows use Ctrl+Q. Adding this for Linux and Windows users means one less configuration for average user but if you don't want to merge, that's fine.

rhysd commented 8 years ago

I want to suggest adding ctrl+q as customizable shortcut rather than hard-coded shortcut. If you agree with the idea, could you modify as below?

  1. Please revert current commit
  2. Add ctrl+q for QuitApp here
  3. Add the default mapping to QuitApp in document

I think it's better to leave the shortcut customizable for users.

dogancelik commented 8 years ago

These programs are used by millions of people and they use Ctrl+Q on Windows. I have been using Windows for 20 years, and I'm sure nobody is going to oppose CmdOrCtrl+Q for quit.