7

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 Answers5

5

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!

Nik
  • 51
2

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
  • 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 – Chris F Carroll May 15 '19 at 10:31
  • Because System Preferences has to be running. You'll get that error if it's not. – William T Froggard May 19 '19 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 Jul 28 '22 at 16:17
2

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.

BardGyver
  • 21
  • 1
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.

Ethan
  • 11
0

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
HexAndBugs
  • 101
  • 2