8

I have a Swiss keyboard and in many (developer-based) programs I get a conflict with one of my favorite shortcuts: Cmd + Shift + 7 or Cmd + /. I use this to set the focus to every OSX application's Help > Search menu entry, where I can search and execute any commands without having to use the mouse.

So for example in Textmate or Xcode this shortcut makes comments from the selected text, rather than jumping to Help > Search.

Now I don't want to do this for every program (A setting I would loose on a new Mac again). So is there a global way to set the Help > Search-Shortcut as the master?

http://i.minus.com/jkwRLQzLVQpSt.png

4
  • Why not use the default cmd-? For the search?
    – Daniel Beck
    Apr 7, 2013 at 7:58
  • @DanielBeck I don't want to search, but rather filter the menu items. I added a screenshot for clarity
    – Besi
    Apr 7, 2013 at 8:08
  • It's the same feature (see the Search label to the left, and search results in the Help Topics section below menu items). AFAIK the default shortcut for this is Cmd-? -- see System Preferences » Keyboard » Keyboard Shortcuts » Application Shortcuts. Hence the question why you don't just use that instead to prevent collision with quite a few programs.
    – Daniel Beck
    Apr 7, 2013 at 11:05
  • 2
    Apparently the default shortcut is Cmd-Shift-/ and that works out to Cmd-? on International English and US keyboards. It's probably simply not adapted for non-US keyboards, similar to the window switcher Cmd-Backtick. I'd still suggest you set it to Cmd-?, which probably prevents quite a few shortcut collisions.
    – Daniel Beck
    Apr 7, 2013 at 11:08

1 Answer 1

6

The easiest option would be to just change the help menu shortcut:

You could use KeyRemap4MacBook to change ⇧⌘7 to ⇧⌘ß:

<autogen>__KeyToKey__ KeyCode::KEY_7, VK_SHIFT | VK_COMMAND, KeyCode::MINUS, ModifierFlag::SHIFT_L, ModifierFlag::COMMAND_L</autogen>

You can also configure shortcuts using a shell script like this:

defaults write -g NSUserKeyEquivalents '{
"Comment Selection" = "@-"; // cmd-minus
"Toggle Comment" = "@-";
}'

In TextMate the shortcuts for bundle items have precedence though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .