Spotlight search is activated by Ctrl+Space.

Unfortunately, this collides with code completion in Eclipse.

I could change the shortcut for either function, but I'd like to stick with the defaults.

Is there a way to disable the Spotlight shortcut when a given application is active (in this case Eclipse)?

link|improve this question

52% accept rate
It's actually cmd+space and, granted, I know there is a solution for this answer, but I couldn't find it right now. – Cawas Apr 30 '10 at 0:00
feedback

2 Answers

I don't think it is possible to disable the Spotlight shortcut just when a specific application is in focus. The closest thing for you to do would be to re-map the shortcut (either Spotlight's or Eclipse's).

To change the keyboard shortcut systemwide for Spotlight:

  • In System Preferences, go to Keyboard, then Keyboard Shortcuts.
  • In the column on the left, select Spotlight.
  • Double click the shortcut (in this case ⌘ Space) and hold down the new shortcut. I suggest something similar, such as option + Space.

enter image description here

link|improve this answer
feedback

Sounds like a job for Autohotkey. Use the ifwinactive or ifwinexist functions. Can't yet work out the exact code, but shouldn't be too hard with a bit of time.

link|improve this answer
1  
Umm… Spotlight is for OS X. Autohotkey is for Windows... – David Pearce Oct 8 '09 at 6:32
Whoops. Should have read closer sorry. – outsideblasts Oct 8 '09 at 6:44
Think I read Spotlight as Silverlight. – outsideblasts Oct 8 '09 at 6:47
There is an autohotkey for mac tho: Iron AHK code.google.com/p/ironahk and there's also an automator alternative that you can drag n' drop commands that resembles AHK, but I can't remember its name. – Cawas Apr 29 '10 at 23:59
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.