3

A trackpad in another room was interfering with my ability to use my laptop's native trackpad, such that I could not click on anything. I wanted to either turn off bluetooth or disconnect the offending device.

I used Finder to get into Bluetooth settings but then I was stuck. I could not figure out a keyboard shortcut to get to the button to turn off bluetooth nor to disconnect the connected trackpad.

enter image description here

  • 1
    hah. I wrote a script that did this exact thing once. I'll share it with you. – William T Froggard Jun 14 '15 at 7:10
3

Go into the Finder, type command + shift + u and open Script Editor by selecting it and typing command + o. In a new script, type (since you can't highlight to copy)

tell application "System Events"
    click button "Turn Bluetooth Off" of window 1 of application process "System Preferences"
end tell

and then type command + r to run the script. The trackpad should now be disconnected.

  • Perfect! Does exactly what I need and gives me a good template for similar simple scripts, as I haven't done any AppleScripting before. – bullcitydave Jun 14 '15 at 17:21
  • I got error "System Events got an error: Can’t get application process \"System Preferences\"." number -1728 from application process "System Preferences" in Mojave – Chris F Carroll May 15 at 10:31
  • Because System Preferences has to be running. You'll get that error if it's not. – William T Froggard May 19 at 16:25
1

If it is just the primary click function you are missing and you still have control of where you move the mouse you likely also have the function to right click.

Therefore, if you can bring up Bluetooth settings with your keyboard using spotlight search, you can then right click on the device you need to disconnect.

No script necessary!

I just did it.

1

If you have a TouchBar Mac Book: Invoke Siri via TouchBar and simply say "Turn Off Bluetooth"

If Siri is not enabled, it will prompt you to enable first.

https://support.apple.com/en-us/HT206993

First time used Siri on my Mac!

0

Another way would be to enable VoiceOver (CMD + F5) and using this to keyboard navigate the bluetooth settings panel with TAB and ENTER plus the arrow keys.

That let's you both turn off bluetooth and disconnect specific devices.

You must log in to answer this question.

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