Sublime Forum

Undefine a key binding

#1

I have ctrl-space set as a global keyboard shortcut (Show Help menu) in Mac OS X.

Sublime Text overrides this in the default keymap:

        { "keys": "ctrl+space"], "command": "auto_complete" },
	{ "keys": "ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
		
			{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
			{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
		]
	},

I can just comment these out, but if I upgrade, then this change gets lost. Is there something I put in the user User key bindings file to “undefine” these?

0 Likes

#2

You can bind ctrl+space to a non-existant command (such as “noop”), which will hide the bindings in the menu for auto_complete, but only since build 2150

0 Likes

#3

Hey, remember me a question I’ve asked long time ago: https://forum.sublimetext.com/t/dev-build-2055/1580/12
But I wonder what happened if you try this before build 2150, an error message in the console ?

0 Likes

#4

I added this line:

{ "keys": "ctrl+space"], "command": "noop" }

This does hide the auto_complete bindings (no more auto-complete popup) , but Sublime Text still intercepts the “Ctrl-space” event., so the global “Show Help Menu” shortcut still doesn’t work.

Note: I’m running build 2157.

0 Likes

#5

There’s no true support for unbinding keys other than editing the default file, unfortunately.

0 Likes

#6

Added as a feature request: http://sublimetext.userecho.com/topic/89378-/

0 Likes