Faulty custom shortcut

I have a lenovo thinkpad t495 which has a bluetooth key to turn bluetooth on and off. I wanted to override that and instead use the key as a custom shortcut to run a script that connects and disconnects my primary bluetooth device.

I used the KDE plasma’s custom shortcut utility in the settings to run the script, and it sometimes connects/disconnects as it should, but sometimes turns the bluetooth on and off instead.

Is there anyway I can properly override the key?

Thanks!

Hi @mji,

The biggest problem I see here, and perhaps someone could corroborate or even expand my answer is this:

Those kinds of keys are usually hardware-based. Meaning they don’t use the Operating System to turn change the function. Instead, they toggle something in the hardware/BIOS. Now, I might be wrong, but that’s how I understand it.

So my first suggestion is see if you can turn that functionality off in the BIOS/UEFI.

My next suggestion would be, if thee first didn’t work, see if you can find a way to disable the keys functionality from Linux. Or maybe just redirect the keystroke to another command. Something like that perhaps…

Either way, AFAIK that’s the cause of the headache. The solution? Well, that’s to be determined.