Home » Questions » Computers [ Ask a new question ]

How to enable Bluetooth in Mac with shortcut or command line?

How to enable Bluetooth in Mac with shortcut or command line?

I accidentally disabled the Bluetooth on Mac OS. I can't enable it because my Bluetooth based keyboard and mouse are now disabled.

Asked by: Guest | Views: 284
Total answers/comments: 4
bert [Entry]

"⌘+Tab until you get to the Finder.
⇧+⌘+G to bring up the Go To dialog: type in /Applications.
Just type the letters ""sys"" and your highlight should be over ""System Preferences"". Press ⌘+O to open it.
In System Preferences, the cursor should be in the search field. Just type in ""bluetooth"" and press Return. Now you're in the Bluetooth preferences.
Press Tab, and there should be a faint highlight on the ""On"" checkbox.
Press Space, and that should turn it on.

If you happen to have Quicksilver installed, invoke System Preferences from there and go directly to step 4 above. Or without Quicksilver press ⌘+Space to activate Spotlight, type ""bluetooth"" and go directly to the Bluetooth preference pane, and step 5 above.

If you don't have a Command key on the keyboard, then hit Ctrl+F2 to activate the Apple menu, press ↓ and go to System Preferences and continue at step 4 above.

If in Step 5 pressing Tab does not navigate through all inputs, then press Ctrl+F7 to activate Full Keyboard Access. When done, press Ctrl+F7 again to disable it."
bert [Entry]

"This method required the bluetooth menu bar status icon to show and used AppleScript GUI scripting (requires System Preferences » Universal Access » Support for assistive devices IIRC):

tell application ""System Events""
tell process ""SystemUIServer""
tell (menu bar item 1 of menu bar 1 whose description is ""bluetooth"")
click
click menu 1's second menu item
end tell
end tell
end tell

Call from command line using osascript:

osascript -e 'tell application ""System Events"" to tell process ""SystemUIServer"" to tell (menu bar item 1 of menu bar 1 whose description is ""bluetooth"") to {click, click (menu item 2 of menu 1)}'

Do not edit this post. I don't care if you don't like the scroll bar. It's easier to select by triple-clicking this way.

Alternatively, you can launch System Preferences and click the checkbox:

tell application ""System Preferences""
set current pane to pane id ""com.apple.preferences.bluetooth""
tell application ""System Events""
tell process ""System Preferences""
click checkbox ""On"" of window ""Bluetooth""
end tell
end tell
quit
end tell

While a GUI process launches, it isn't visible except for the Dock icon."
"This method required the bluetooth menu bar status icon to show and used AppleScript GUI scripting (requires System Preferences » Universal Access » Support for assistive devices IIRC):

tell application ""System Events""
tell process ""SystemUIServer""
tell (menu bar item 1 of menu bar 1 whose description is ""bluetooth"")
click
click menu 1's second menu item
end tell
end tell
end tell

Call from command line using osascript:

osascript -e 'tell application ""System Events"" to tell process ""SystemUIServer"" to tell (menu bar item 1 of menu bar 1 whose description is ""bluetooth"") to {click, click (menu item 2 of menu 1)}'

Do not edit this post. I don't care if you don't like the scroll bar. It's easier to select by triple-clicking this way.

Alternatively, you can launch System Preferences and click the checkbox:

tell application ""System Preferences""
set current pane to pane id ""com.apple.preferences.bluetooth""
tell application ""System Events""
tell process ""System Preferences""
click checkbox ""On"" of window ""Bluetooth""
end tell
end tell
quit
end tell

While a GUI process launches, it isn't visible except for the Dock icon."
bert [Entry]

"Here is a faster way which I just did on Lion:

Command + Spacebar to start spotlight
type ""bluetooth""
Select ""Bluetooth File Exchange""
This will trigger a warning that bluetooth is disabled, the enable button should be highlighted so all you need to do now is press return"
bert [Entry]

"Press ⌘Space, write ""bluetooth"".
Press the following combination: Fn⌃F7. A light blue frame appears arround the activate box.
Press spacebar, finished!"