[TxMt] Change the global key binding for completion

Allan Odgaard throw-away-1 at macromates.com
Tue Feb 7 21:22:17 UTC 2006


On 7/2/2006, at 22:12, Charilaos Skiadas wrote:

>> Hmmm, I tried putting this in there, but it didn't seem to work.
>>     "@/" = "nextCompletion:";
>> Instead, it still runs comment-line.  Any idea where I could find  
>> that
>> binding and move it? [...]
> comment line is a command in the Source bundle. Bundle commands  
> take precedence over generic system commands [...]

Unfortunately though, the way Cocoa apps work is that the key  
bindings file is used by the control which has focus, but before this  
control sees the key event, the menu will resolve keys and send to  
the proper target, and the menu manager seems to eat most keys with  
the command modifier, so these are never sent to the view.

Effectively this means that one cannot use the command modifier for  
key bindings in the DefaultKeyBindings.dict file.

It is however possible to record a macro that does the Next  
Completion and save that macro with a key binding that has the  
command modifier key.

I may eventually add some workarounds for how this currently work, so  
that the active control gets to see the keys before the menu manager  
(although this isn't always ideal).




More information about the textmate mailing list