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


5 Answers 5


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. Commented Jun 14, 2015 at 17:21
  • 2
    I got error "System Events got an error: Can’t get application process \"System Preferences\"." number -1728 from application process "System Preferences" in Mojave Commented May 15, 2019 at 10:31
  • Because System Preferences has to be running. You'll get that error if it's not. Commented May 19, 2019 at 16:25
  • As of 2022, os 12.4, I always get the error System Events got an error: Can’t get button "Turn Bluetooth Off" of window 1 of application process "System Preferences". whether System Preferences is open or not. You also need to press Command + n for a new script.
    – Adam_G
    Commented Jul 28, 2022 at 16:17

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.


First time used Siri on my Mac!

  • 2
    Dont need TouchBar just cmd+space Siri
    – chris
    Commented Oct 13, 2019 at 0:46

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.

  • In 2019 this was the only option that worked for me.
    – stone
    Commented Oct 1, 2019 at 16:56

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.


This works in BigSur 11.2.3:

  1. Go to System Preferences > Keyboard > Shortcuts
  2. Check Use keyboard navigation to move focus between controls

Then, in future:

  1. Cmd <Space> to open Spotlight Search
  2. Type bluetooth and select the Bluetooth settings app
  3. Press the tab key to move focus to the Turn Bluetooth On or Turn Bluetooth Off button
  4. Press space to activate the button

You must log in to answer this question.

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