Unable to create 'ctrl-cmd-S' key binding [SOLVED]


#1

I’m on Mac and I want to create a custom ‘ctrl-cmd-S’ key binding to replicate Coda 2 “save and publish” functionality (I have reasons to disable upload-on-save by default in atom).

So I’ve added the below to the init script:

atom.commands.add 'atom-text-editor', 'user:save-and-sync', ->
  editor = atom.views.getView( atom.workspace.getActiveTextEditor() )
  atom.commands.dispatch(editor, 'core:save')
  atom.commands.dispatch(editor, 'atom-sync:upload-file')

And tried to use following key binding:

‘body’:
‘ctrl-cmd-S’: ‘unset!’

‘atom-workspace’:
‘ctrl-cmd-S’: ‘user:save-and-sync’

However when I toggle command palette and filter by ‘user’, the key binding displayed in blue has shift added to it, as if I used ‘shift-ctrl-cmd-S’.

How can I get rid of that extra “shift” in the key binding and bind my custom command to ‘ctrl-cmd-S’?

Thanks!


#2

I can’t seem to edit my original post, so here’s the screenshot:


#3

The keybindings should be in all lower-case. Originally, we used s to mean S and S to mean Shift+S. This was confusing, so we now use s and shift-s in all of Atom’s keymaps. But to keep from breaking people’s packages, we left the keymapping system the way it was.