[TxMt] Re: How to know if a key equivalent is already used in TextMate 2 ?

Allan Odgaard mailinglist at textmate.org
Sun Jan 12 04:25:57 UTC 2014


On 10 Jan 2014, at 18:39, Adam Strzelecki wrote:

>> I think that CheatSheet manages it somehow... 
>> http://www.mediaatelier.com/CheatSheet/
> I believe it does it going through all menu items, this can be done I 
> believe in TM2 too. However this will not account any system wide 
> shortcuts.

Going through the menu is required, yes, as we would otherwise not 
include disabled menu items.

The “a little tricky” I mentioned was having to deal with potential 
menu delegates and matching a menu item’s key equivalent to the actual 
key event pressed: this might sound simple, but it is not. Though 
majority of the trial-and-error replicating the system’s behavior when 
interpreting key equivalents has been done in relation to my handling of 
KeyBindings.dict and related.


More information about the textmate mailing list