9 Replies Latest reply: May 3, 2008 5:23 AM by Barney-15E
Cheefster Level 1 Level 1 (5 points)
Does anyone know how to set a keyboard shortcut to "Turn Bluetooth On"?

I've looked in the keyboard shortcuts menu, and all I can do is add a keyboard shortcut to an application, but I don't know which application or command I need to set a keyboard shortcut to.

Thanks

Macbook Pro C2D, 2.33GHz, Mac OS X (10.5.2)
  • fiorentino97 Level 1 Level 1 (0 points)
    This one stumped me as well—I wanted to add a "Sync Now" shortcut to my .mac menulet. In the Keyboard and Mouse preference pane, go to Keyboard shortcuts and click "+". Choose "All Applications" (which should be the default), then add your preferred shortcut. Now, for me the shortcut didn't appear instantly like it does with a specific application, which is why I thought it wasn't working. I had to restart the computer after adding the shortcut, and that seemed to do the trick. The shortcut now appears next to the command. I believe this method will work for any menu extra.
  • V.K. Level 9 Level 9 (56,130 points)
    You can't. Not without some 3rd party application launcher like Quicksilver and a little coding (I can explain further if you really want to).
    You can, however, put a bluetooth icon in the menu bar and turn it on and off from there. That's almost as fast as a keyboard shortcut.
  • fiorentino97 Level 1 Level 1 (0 points)
    It appears I spoke too soon. I can add shortcuts to menu extra commands using the method described above, but they won't actually execute. Am I doing something wrong? Are certain shortcut combinations forbidden?

    Also, I noticed that Dan Frakes at MacWorld suggests it can be done: http://www.macworld.com/article/131902/2008/02/1052applelistens.html. He adds a shortcut for the Back Up Now command in the Time Machine menu extra.
  • V.K. Level 9 Level 9 (56,130 points)
    I really wonder how Dan Frakes makes this work. Seems impossible to me.
    Yes, you can add a shortcut like he suggests but it won't work. Well, it will srt of work but not in any useful way. The trouble is that to activate the shortcut, menu bar (or rather SystemUIserver which is the application that controls it) has to be active. In other words, you actually need to click on the menu bar first before your shortcut will work. That entirely defeats the purpose of the shortcut.
  • Sam Kivi Level 1 Level 1 (25 points)
    I have the same problem trying to get a kb shortcut to turn airport on off. I even tried adding a shortcut to the application Time Machine but i can't get the menu bar short cut for time machine to shows it's short cut like frakes' screenshot shows...
  • Sam Kivi Level 1 Level 1 (25 points)
    the screenshots in the link posted below your post shows Time Machine's Menu Bar icon menu has a shortcut linked to it, there must be a way to do it, unless it's a photoshopped screenshot!
  • Sam Kivi Level 1 Level 1 (25 points)
    I just emailed Dan, and asked him how he made shortcuts to menu items. He replied:

    "It evidently varies by menu; some of the "Menu Extra" menus -- those on the
    right-hand side of the menu bar -- let you assign shortcuts, whereas others
    don't. Even when they do, I've discovered that the keyboard shortcut doesn't
    always work. Sorry to be the bearer of bad news! The alternative is a bit
    trickier: Creating AppleScripts for such purposes and then using a
    third-party utility to assign those scripts to keyboard shortcuts."

    I have had good luck using automator to follow my actions, in turning on and off the airport from the menu bar. One problem I found was Automator recognised me clicking the Airport icon, moving down the dropdown menu, but it would not recognise me clicking "Turn AirPort Off". So I had to click on airport icon, then use arrow keys, and Enter key, to select "Turn Airport Off". Then simply make an "application" for this action in Automator, and use some third party app to make a short cut to the automator-created app. I'm going to try out using Spark :http://www.shadowlab.org/Software/spark.php, but you could probably use Quicksilver too.
  • Sam Kivi Level 1 Level 1 (25 points)
    I have a solution for you, which unfortunately still involves either spotlight or for a direct kb shortcut, another program such as spark or quicksilver.
    I found a script for toggling the airport on/off which is very quick
    http://jwdunn.com/file/airportpowerscript.zip
    if you open it in script editor you should be able to easily modify it to turn bluetooth on/off (using the bluetooth menu extra in the menubar).
    then use quicksilver or spark (recmmnd spark for simplicity) to assign a shortcut to the script.
  • Barney-15E Level 8 Level 8 (42,085 points)
    While not a shortcut, you can turn on Keyboard Navigation in the Keyboard and Mouse prefpane. Select the Items you want to access with the keyboard. By default, menu extras are ctrl+F8.

    If you put the bluetooth menu extra on the left, it will be the first to activate, otherwise, you'll have to arrow (or tab) over to it. Once activated, you can start typing the name of the command.
    So, if it is on the left, you can ctrl+F8, T, Enter (or space).