1

I want to disable the "space+shift" thing in Sublime Text, it creates something that looks exactly like a space unless marked, and it messes upp all my scripts because I always accidentally type it. I was not able to find anything like "space+shift" or "shift+space" inside the sublime-keymap.

  • 1
    My Language/Region settings are English/USA and I see nothing to disable because "space+shift" is not defined and is nothing more then two keys being pressed, which on my system only produces a space. Additionally, looking at the file in a hex editor shows it as hex 20 which is nothing more then a space. That said, this may not be the case in other Language/Region settings, so you might need to provide more information especially what exactly you mean by "and it messes upp all my scripts". – user3439894 Dec 15 '15 at 12:22
  • Nothing to add to user3439894's comment except that you should add a screenshot of the messed up scripts. – klanomath Dec 15 '15 at 12:28
  • I forgot to add I tried "shift+space" as well as "space+shift" and the results are the same, a space (hex 20) being typed. – user3439894 Dec 15 '15 at 12:52
  • @klanomath What's interesting about seeing a screenshot of the scripts? Sorry if I didn't explain well, but it looks the exact same but it doesn't work the same. If I want to match a string that's exactly string (string+space) and I accidentally pressed that weird character, I will match string (string+weird character) and that messes my scripts up. – DisplayName Dec 15 '15 at 12:57
  • 1
    @DisplayName As user3439894 I can't reproduce the behavior of Sublime you describe. I also get 0x20 as result with the one or the other key(-combo). – klanomath Dec 15 '15 at 13:10
1

On my system I can't reproduce the behavior of Sublime described by the OP. The problem may be related to an interfering third-party app/process.

One possible solution - configuring a new keycode with Karabiner to avoid the problem - is outlined below.

To disable or modify ShiftSpace in Sublime just remap the key combo with Karabiner. Usually you have to define an app in /Applications/Karabiner.app/Contents/Resources/appdef.xml if you want to adjust/modify an app-only shortcut. Since the appdef list already contains Sublime Text you can immediately add a new remapping.

  1. Download, install and open Karabiner
  2. Open in the menulet Karabiner -> Preferences
  3. Open the tab Misc & Uninstall
  4. Hit the button Open private.xml
  5. Open the file private.xml with an appropriate editor
  6. Enter the customized keycode

    Example (ShiftSpace -> Space):

    <?xml version="1.0"?>
    <root>
      <item>
        <name>Enable at only SUBLIMETEXT</name>
        <item>
          <name>Shift+Space to Space</name>
          <identifier>remap.app_sublime_shiftspace2space</identifier>
          <only>SUBLIMETEXT</only>
          <autogen>__KeyToKey__ KeyCode::SPACE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::SPACE</autogen>
        </item>
      </item>
    </root>
    
  7. Save the file

  8. Open in the menulet Karabiner -> Preferences the tab Change Key
  9. Hit the ReloadXML button
  10. Enable the Sublime Text remapping. It should be listed at the beginning.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .