osx - Are the shortcut keys in Sublime Text 2 the same on OS X and Windows, if you exchange Cmd with Ctrl?

06
2014-04
  • Golo Roden

    I am using Sublime Text 2 on OS X, and I really like that editor. Now I need to explain the way Sublime Text 2 works to someone who is using Windows, and of course there's no Cmd key there. I guess that the equivalent would be Ctrl, but I'm not sure if this works for Sublime Text 2 in all cases.

    Does anybody know if OS X and Windows key bindings are the same, if you simply exchange Cmd for Ctrl?

    Or does anybody know where you can look the shortcuts up, so I can manually compare them?

  • Answers
  • MattDMo

    Many of the key bindings are the same, but not all of them, so you can't just automatically exchange Ctrl for Command ⌘.

    However, with Sublime Text 2 it is quite easy to look up all the default key bindings that come with the editor. Navigate to Preferences -> Browse Packages... to open up the Packages folder. Go to the Default subfolder and open the Default (OSX).sublime-keymap and Default (Windows).sublime-keymap files, and set the syntax to JavaScript -> JSON for readability. These files contain all of the key bindings that come with Sublime (but not the ones that plugins may install), so you can search for an OSX binding in one file, get the "command" name, then search for that in the Windows file to get its equivalent.

    Note that in the OSX bindings the Command key is called super.


  • Related Question

    keyboard - How come my bind for ctrl-` doesn't work in Sublime Text 2 on Bootcamp?
  • Charles Randall

    Not sure what's up with this. But my default bind for ctrl-` in Sublime Text 2 doesn't work. I can rebind it to something else, that works, but the app doesn't recognize any bind involving the ` key.

    I'm on a late 2011 15" MacBook Pro and running Windows 7 via Bootcamp.

    One of the problems appears to be, after logging input, that when I hold the control button, Sublime Text believes that the input that was pressed was \.

    If I hold the Fn key, I can actually convince it that yes, it is a backquote. But once I started looking at this, I found all kinds of other weird little issues.

    Language is set to United States English, and the keyboard is set to United States (Apple).

    Any ideas?


  • Related Answers
  • Charles Randall

    The United States (Apple) keyboard is the culprit. Setting the keyboard to standard US keyboard as default fixes the issue, with no apparent downside.