Home Download Buy Blog Forum Support

Undefine a key binding

Undefine a key binding

Postby lorin on Wed Dec 21, 2011 7:54 pm

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:
Code: Select all
   
        { "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?
lorin
 
Posts: 9
Joined: Thu Dec 08, 2011 3:41 am

Re: Undefine a key binding

Postby jps on Wed Dec 21, 2011 7:59 pm

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
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Undefine a key binding

Postby bizoo on Wed Dec 21, 2011 8:07 pm

jps wrote: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

Hey, remember me a question I've asked long time ago: http://www.sublimetext.com/forum/viewtopic.php?p=9222#p9222
But I wonder what happened if you try this before build 2150, an error message in the console ?
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Undefine a key binding

Postby lorin on Mon Jan 02, 2012 9:39 pm

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


I added this line:

Code: Select all
{ "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.
lorin
 
Posts: 9
Joined: Thu Dec 08, 2011 3:41 am

Re: Undefine a key binding

Postby jps on Mon Jan 02, 2012 11:24 pm

There's no true support for unbinding keys other than editing the default file, unfortunately.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Undefine a key binding

Postby lorin on Thu Jan 05, 2012 8:00 pm

lorin
 
Posts: 9
Joined: Thu Dec 08, 2011 3:41 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 33 guests

cron