After my question on forum.kde.org did not really came to a result, I
will try it here. I asked for how to define a "keyboard shortcut to
enable or activate bluetooth".
The question is not about how to enable the bluetooth service in the OS,
the question is about how to assign a shortcut to the function of a
button which KDE Plasma provides for enabling the service.
I can enable this particular service by a mouse click, as KDE Plasma
provides a button for this. You can find it here:
System Settings - Network - Bluetooth
There, emphasized by alarming color it is written:
"Bluetooth is disabled" and next to it is nicely provided an "Enable"
button which perfectly works.
I would like to have this "Enable" button (or the functionality it
calls) to become triggered by a keyboard shortcut and would like to know
where and how to configure this shortcut. I could imaging, although not
finding it readily offered in the System Settings - Workspace -
Shortcuts - Global Shortcuts section, that it still might be possible
to maybe (how?) configure this in the Custom Shortcuts section or
maybe by directly editing a configuration file (which line has to be
added to which file?). Well, this is what I am searching for.
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.62.
Qt Version: 5.12.5
Kernel Version: 5.5.0-2-amd64
Am Dienstag, 28. April 2020, 18:46:19 CEST schrieb Marco Möller:
> I would like to have this "Enable" button (or the functionality it
> calls) to become triggered by a keyboard shortcut and would like to know
> where and how to configure this shortcut.
go to Systemsettings -> Workspace - Shortcuts -> own Shortcuts.
Then select 'Edit -> new -> global Shortcut -> Command/Adress'
Set up your trigger and enter 'bluetoothctl power on' in the Action tab.
I tried it and it works. But no toggle.
> Am Dienstag, 28. April 2020, 18:46:19 CEST schrieb Marco Möller:
>> I would like to have this "Enable" button (or the functionality it
>> calls) to become triggered by a keyboard shortcut and would like to know
>> where and how to configure this shortcut.
> Hi Marco,
> go to Systemsettings -> Workspace - Shortcuts -> own Shortcuts.
> Then select 'Edit -> new -> global Shortcut -> Command/Adress'
> Set up your trigger and enter 'bluetoothctl power on' in the Action tab.
> I tried it and it works. But no toggle.
This is great information. I now understand where and how to set the
shortcut, Thanks a lot!
The command itself is not working, though.
I tested the command interactively on a CLI as the user or with sudo and
got with sub-command "devices" (and others) the error message: "No
default controller available".
The internet is full of questions about this and by now I could not find
any good answer. There are suggestions that the problem would have been
solved after a cold start (not simply a reboot), after driver
re-installation, booting into Windows and back into Linux, and many more
BUT: if I use the mouse in order to trigger the button, then bluetooth
becomes enabled or disabled without any problems, forth and back,
repeatedly. And if it first becomes enabled by the mouse click on the
button, then I also succeed on the CLI with the commands given as a user
"bluetoothctl power off" and "bluetoothctl power on", forth and back,
repeatedly, AND ALSO the keyboard shortcut works.
Once I use the mouse for deactivating bluetooth by the button, then the
bluetoothctl commands again fail with said error message.
So, there is obviously something more what this button is doing, before
setting the power on and after setting the power off. It knows the magic
trick how to activate/deactivate the communication with the the present
hardware, something what according to my internet search only few people
I will continue this topic now in a new thread, as the keyboard shortcut
question is well answered, and finding all needed bluetooth controlling
commands might better appear with a different subject line in its own