Question

In Textmate there is a great shortcut to get to the context menu without using the mouse (I wish it worked systemwide!!!). It is Opt+F2.

When working on my Macbook, however, F2 is mapped to screen brightness, so I have to press fn+opt+F2, for which I have to use both hands - and that's quite uncomfortable. Is the a way how I could map it to the right opt key, for example?

Was it helpful?

Solution

For TextMate 2 you can create ~/Library/Application Support/TextMate/KeyBindings.dict and let it contain something like:

{ "@d" = "showContextMenu:"; }

Here @d corresponds to ⌘D. See this blog post on how to construct the key equivalent strings.

Source: TextMate mailing list

Key binding files are read in the following order. A new binding for a bound key overrides the previous one:

  1. /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict
  2. /Library/KeyBindings/DefaultKeyBinding.dict
  3. ~/Library/KeyBindings/DefaultKeyBinding.dict
  4. /path/to/TextMate.app/Contents/Resources/KeyBindings.dict
  5. ~/Library/Application Support/TextMate/KeyBindings.dict

A relaunch of TextMate (⌃⌘Q) is required before changes take effect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top