MacOS – How to disable Command + Control + Arrow Key shortcut in Mavericks

keyboardmacos

I use Sublime Text and this shortcut (Edit > Line > Swap Line Up/Swap Line Down) allows me to move lines of code up and down in the file while shifting everything around it. On my new computer this command moves the window currently in focus to the next space.

I checked the keyboard shortcuts in Preferences but could not find it. Where else can I find the shortcut and disable it so that I can use it in Sublime?

Best Answer

As an alternative solution for Sublime Text (if you want to keep the new OS key mappings) you can add the following lines to your user key bindings file (in menu Subline Text 2 > Preferences > Key Bindings - User):

{ "keys": ["super+shift+up"], "command": "swap_line_up" },
{ "keys": ["super+shift+down"], "command": "swap_line_down" }

This will map +Shift+ or to the Swap Line Up/Down commands.

A similar issue exists with the batch selection commands usually mapped to Ctrl+Shift+ or .

These can be remapped using the following settings:

{ "keys": ["ctrl+alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+shift+down"], "command": "select_lines", "args": {"forward": true} } 

This will map Ctrl+Alt+Shift+ or to the batch selection commands.

Obviously you can change the combinations to whatever you prefer, but these did not seem to be used for anything.