Keyboard – How to Turn Off Bluetooth with Only Keyboard Actions

bluetoothkeyboardshortcuttrackpad

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

Best Answer

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.