Bug 300532 - Custom keyboard shortcuts are reset on reboot or logout – KDE 4, KDE 5
Summary: Custom keyboard shortcuts are reset on reboot or logout – KDE 4, KDE 5
Status: RESOLVED UNMAINTAINED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_khotkeys (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords:
: 233247 268942 325721 372365 385800 395420 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-23 23:23 UTC by Frank Souza
Modified: 2024-03-04 19:41 UTC (History)
30 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Warning dialogue when assigning shortcut that was reset (13.98 KB, image/png)
2023-10-04 00:23 UTC, Roy Orbitson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Souza 2012-05-23 23:23:44 UTC
Custom keyboard shortcuts are reset on reboot or logout.
Try assigning a custom hotkey in Global Hotkeys >> Plasma shell component >> SystemTray-klipper-8. When reboot or logout combination is returned to the default. I want to use hotkey CTRL + ALT + V to Inkscape, not to Klipper



Reproducible: Always

Steps to Reproduce:
1. Try assigning a custom hotkey in Global Hotkeys >> Plasma shell component >> SystemTray-klipper-8
2. Reboot or Logout
3. Try to use hotkey
Actual Results:  
I want to use hotkey CTRL + ALT + V to Inkscape, not to Klipper. This Hotkey open Klipper

Expected Results:  
That remains custom override

Kubuntu 11.10 64 bits
Kernel release: 3.0.0-19-generic
KDE 4.8.2
Comment 1 Christoph Feck 2012-05-23 23:50:34 UTC
Can you check if removing the hotkey for Klipper can be done using:
- right click on system tray expander arrow
- select "System Tray Settings"
- in "Entries" list, change keyboard shortcut for Klipper
Comment 2 Frank Souza 2012-05-24 00:00:27 UTC
Yeah, work! But this would not be a bug? Since changing the hotkey by systemsettings, this change should not replace? Anyway, my problem has been solved
Comment 3 Christoph Feck 2012-05-24 10:37:12 UTC
Yes, it's a bug. Either the System Settings dialog should hide the shortcuts assigned by Plasma, or Plasma should detect changes in the System Settings dialog.
Comment 4 Denys 2013-01-18 05:22:43 UTC
My 2c: whatever the solution is, after removing or changing that shortcut it should be possible to save and restore that in 'system settings'.

P.S. Thanks for the workaround. This bug is quite annoying.
Comment 5 Christoph Feck 2013-04-15 17:50:14 UTC
*** Bug 233247 has been marked as a duplicate of this bug. ***
Comment 6 AlexCzar 2013-09-26 09:51:49 UTC
Lost couple of days trying to solve this. Finally went here to report the bug, and found out it was already reported. I don't know why google didn't show me this one.
By the way the bug remains in 4.11.1
Comment 7 AlexCzar 2013-09-28 10:53:13 UTC
Actually the solution mentioned by  Christoph Feck doesn't work! It does what it should but after restart I still have klipper with Alt+Ctrl+V if I deleted it, and if I just changed it I have two shortcuts - new one and Alt+Ctrl+V. This is VERY annoying as I'm a software developer and Alt+Ctrl+V is a frequently used shortcut in my IDE. So each reboot I have to erase the shortcut to be able to program.
Comment 8 Christoph Feck 2013-10-06 21:14:17 UTC
*** Bug 325721 has been marked as a duplicate of this bug. ***
Comment 9 Vladimir Kulev 2013-11-04 17:30:57 UTC
I confirm problem for 4.11.2
Luckily there is a workaround - edit ~/.kde/share/config/kglobalshortcutsrc and ~/.kde/share/config/plasma-desktop-appletsrc files while plasma-desktop is not running, and set "SystemTray-Klipper-8" to empty value.
Comment 10 Christoph Feck 2014-02-09 19:08:42 UTC
*** Bug 268942 has been marked as a duplicate of this bug. ***
Comment 11 Vitor Boufleur 2015-04-24 18:13:08 UTC
I'm having this bug too. Don't know how to fix it.
Comment 12 SuperHans 2015-06-18 19:05:57 UTC
I love KDE but that this bug is still not fixed is really annoying and not user friendly :(
Comment 13 mpritcha 2015-08-13 03:58:45 UTC
Hi,

I'm still having this issue too.

I remove the Activate Application Launcher Widget setting under Global Keyboard Shortcuts -> plasmashell as the default shortcut of Alt+F1 conflicts with my Java IDE.

When I restart KDE, this always reverts to the default again.

I've tried following ~/.xsession-errors but nothing specific is logged. Running systemsettings5 from a terminal doesn't log anything either. 

Not sure how to reproduce?

Thanks

Mark
Comment 14 mpritcha 2015-08-13 03:59:41 UTC
Sorry, when I said 'not sure how to reproduce' I should have said 'not sure how to troubleshoot'.
Comment 15 mpritcha 2015-08-13 04:00:36 UTC
*** This bug has been confirmed by popular vote. ***
Comment 16 Yichao Zhou 2015-09-10 09:32:12 UTC
I also met the Alt+F1 problem...
Comment 17 stephen.friedrich 2015-10-22 07:51:56 UTC
Three years later and still no fix :-(
I am running Kubuntu 15.0.4

Also I don't know how to make the mentioned workaround work that involves files from ~/.kde/share/config/ 
Those specific files in that folder simply do not exist anymore.

Any other workaround?
Anything I can do to help?
Comment 18 Damian Nowak 2015-10-22 16:00:11 UTC
I see my coworker struggle with this every time he restarts his computer.

They've never fixed it.
Comment 19 Damian Nowak 2016-01-14 17:41:44 UTC
Now I see myself struggle with this after upgrading to KDE 5...
Comment 20 Damian Kaczmarek 2016-01-14 17:43:17 UTC
Michael Jansen: Any progress on this? This is still terribly broken. Please share a workaround at least or provide instructions on how to help in debugging this.
Comment 21 WarnerJan 2016-04-08 09:35:27 UTC
I am pulling my hair out over this bug. I use an IDE to develop software (IntelliJ IDEA) and it's full of keyboard shortcuts that are shared with KDE. Especially the well-known ALT-F1 is notorious for coming back after a logout. 

But also, I can't get CTRL-F8 to work. It literally does nothing. This shortcut is not to be found in the regular "System settings" -> shortcuts applet, but in (right click) Pager -> Configure desktops -> Check "Show shortcuts for all possible desktops". If I set this shortcut to "none", CTRL-F8 still doesn't work in my IDE, and I can't find where I should change it. For the record, the other Pager shortcuts work, CTRL-F9 actually compiles my code instead of going to desktop 9.

So I have several shortcuts I want to get rid of but I don't know how.
Comment 22 WarnerJan 2016-04-08 10:23:05 UTC
I found out where the CTRL-F8 key was coming from: Cairo Dock.... *sigh*
Comment 23 WarnerJan 2016-04-08 10:37:36 UTC
Sorry to be polluting this bug report with my comments. Feel free to merge my comments.

Now that I have eliminated Cairo Dock, the keys still don't work because of the Pager. I can disable them in the settings applet, but now I am back in the original situation where KDE doesn't remember that I set it to "none". So I am still desperate for a workaround.

Sorry for the noise.
Comment 24 vatbier 2016-05-14 18:51:08 UTC
solution for people wanting to change the default Alt+F1 for the application launcher to something else:
in https://bugs.kde.org/show_bug.cgi?id=346918 I found the solution: right-click on launcher menu icon>Application Launcher settings> change keyboard shortcut from Alt+F1 to meta+space.
Then in systemsettings>shortcuts>global>plasma>Activate Application Launcher Widget> the global shortcut shows that it has changed to meta+space.
And it persists after a logout.

Kubuntu 16.04 here with plasma 5.5.5
Comment 25 SuperHans 2016-07-18 19:14:07 UTC
Guys, it seems so if I found a workaround for this issue:
* Adopt ~/.config/kglobalshortcutsrc to your needs
* Save
* Force kglobalaccel (apparently, responsible for the global shortcuts) to quit and restart: kquitapp kglobalaccel && sleep 2s && kglobalaccel5& 

If your modifications haven't been overridden, everything should work. I restarted the session and even the computer and it seems that the settings are really saved and loaded correctly. Let me know if it worked too for you, so I didn't spent hours google-ing for nothing :D
Comment 26 mdhirsch 2016-07-18 21:09:49 UTC
I couldn't get SuperHans' idea to work for me.  The system I tested on is an LTS system so it is a bit old.  I need to test it on a more modern KDE.

On my system, I could see that ~/.kde/share/config/kglobalshortcutsrc gets overwritten on KDE start-up.  So I tried creating a small ~/.config/kglobalshortcutsrc but that didn't seem to have any effect.
Comment 27 SuperHans 2016-07-19 06:41:16 UTC
Hi mdhirsch,

Sorry, I forgot to mention what my system looks like:
4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
with KDE Plasma 5.5.5 (QT 5.5.1)

For example, I don't have a conf file in .kde/share. Did you try to modify it there? Maybe it could also help to restrict the access to read only...

The bug is more than 4years old and no one seems to care :(
Comment 28 SuperHans 2016-07-19 16:56:05 UTC
Oh, I have to revise my comment.The file is updated by without overriding the custom binding, e.g. line 
Expose=Meta+W,Meta+W,Fenster der aktuellen Arbeitsfläche anzeigen
has been updated to
Expose=Meta+W,Ctrl+F9,Fenster der aktuellen Arbeitsfläche anzeigen

*Sry for spamming
Comment 29 mdhirsch 2016-07-19 19:46:09 UTC
SuperHans: I did try modifying ~/.kde/share/config/kglobalshortcutsrc.  What worked for me is (following Vladimir Kulev) to edit both ~/.kde/share/config/kglobalshortcutsrc and ~/.kde/share/config/plasma-desktop-appletsrc and set "SystemTray-Klipper-6" to empty value.  (The number in that key-name seems to vary.)
Comment 30 Dan Dascalescu 2016-08-18 03:28:50 UTC
Amazing that this 4-year old bug still hasn't been fixed. I also use IDEs with tons of shortcut keys (WebStorm), and honestly, KDE's amount shortcuts is RIDICULOUS: it provisions for 20 desktops (TWENTY), but not for switching to individual windows - see http://askubuntu.com/questions/813262/which-desktop-environments-allow-switching-among-windows-with-supernumbers/813575#813575
Comment 31 Piotr Dobrogost 2016-08-18 07:50:22 UTC
@Dan Dascalescu
Just use newer KDE 5 where there's no such a problem.
Comment 32 mpritcha 2016-08-18 08:07:22 UTC
The problem is exactly the same in kde 5 unfortunately. 

--

Mark Pritchard

> On 18 Aug 2016, at 17:50, Piotr Dobrogost via KDE Bugzilla <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=300532
> 
> Piotr Dobrogost <p@bugs.kde.dobrogost.net> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |p@bugs.kde.dobrogost.net
> 
> --- Comment #31 from Piotr Dobrogost <p@bugs.kde.dobrogost.net> ---
> @Dan Dascalescu
> Just use newer KDE 5 where there's no such a problem.
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 33 Christoph Feck 2016-11-14 02:41:29 UTC
*** Bug 372365 has been marked as a duplicate of this bug. ***
Comment 34 Martin Vysny 2017-06-02 17:46:37 UTC
Reproduced on Plasma 5.9.4 - I tend to reconfigure the Global Keyboard Shortcuts / Plasma / Activate Application Launcher Widget from Alt+F1 to Meta+F1, only to find it reverted back to Alt+F1 on reboot.
Comment 35 Christoph Feck 2017-06-07 17:03:00 UTC
As a workaround, change the shortcut using Plasma (right-click the launcher > Settings > Keyboard shortcuts).
Comment 36 Martin Vysny 2017-06-10 07:06:28 UTC
@Christoph : Thank you, the workaround works perfectly.
Comment 37 Christoph Feck 2018-01-31 03:52:32 UTC
*** Bug 385800 has been marked as a duplicate of this bug. ***
Comment 38 mpritcha 2018-01-31 04:44:17 UTC
The bug can be reproduced easily by terminating plasmashell and restarting it (e.g. via a konsole window).
Comment 39 Piotr Dobrogost 2018-04-09 06:53:01 UTC
Any news on this 6 years old bug?
Comment 40 Christoph Feck 2018-06-27 16:21:08 UTC
*** Bug 395420 has been marked as a duplicate of this bug. ***
Comment 41 Pablo 2018-08-29 11:11:51 UTC
Still same thing, did a fresh install of ubuntu 18 then installed kubuntu-desktop and this bug still is present, here I am trying to set "Activate Application Launcher Widget" under menu-item "Plasma" to "None" as phpstorm uses the shortcut but after each reboot the key is reset.
My assignment of "Meta+D" for "Show Desktop" under the "KWin" meny persists
Comment 42 Danloc 2019-05-30 10:38:07 UTC
This bug is still present.

KDE-Plasma-Version: 5.15.1

The shortcut settings resets on every restart or reboot.
On my system i tried to install different application launchers like "Tiled Menu" but the bug was present with and without it. 
The shortcut "Alt+Right" was set in Global Shortcuts > Plasma > Enable Tiled Menu > [ALT+Right].
That meant that i could not use the [Right Arrow Key button] in any software which is terrible in editors, terminal etc.  

After spending hours in trying to fix it with editing the ~/.config/kglobalshortcutsrc and ~/.config/khotkeysrc, the only way it worked for me was linked from "vatbier 2016-05-14 18:51:08 UTC" https://bugs.kde.org/show_bug.cgi?id=346918

The way my keybindings persist after restart/reboot is to the application settings like:

Application Launcher:
right-click on launcher menu icon>Application Launcher settings> change keyboard shortcut from Alt+F1 to meta+space.
Comment 43 Damian Nowak 2019-09-16 22:06:30 UTC
Meanwhile, a decade later, you still can't remove the global Alt+F1 shortcut permanently...
Comment 44 quazgar 2022-07-20 07:04:59 UTC
What worked for me: Manually making sure that ~/.config/kglobalshortcutsrc and ~/.config/plasma-org.kde.plasma.desktop-appletsrc are in sync. If necessary, delete entries from both (while not being logged in with KDE).
Comment 45 Mattis Kristensen 2023-07-22 13:11:52 UTC
Still having this issue as of 2023 - hope it gets resolved soon, as it is driving me nuts.

CPU: AMD Ryzen 5 2600
GPU: NVIDIA GeForce GTX 1660 Super
Motherboard: B450M DS3H
KDE Plasma Version: 5.27.6 on X11
Comment 46 Roy Orbitson 2023-10-04 00:23:18 UTC
Created attachment 162069 [details]
Warning dialogue when assigning shortcut that was reset

I think I'm encountering the same bug with a slightly different symptom.

I assign Meta + V to the clipboard widget instead of the cursor-position pop-up, to work around bug 440722. After each logon, the shortcut fails. I have to reassign it even though the warning says it's already assigned to the same thing.
Comment 47 Nate Graham 2024-03-04 19:41:52 UTC
As announced in https://pointieststick.com/2023/07/26/what-we-plan-to-remove-in-plasma-6/ and https://community.kde.org/Plasma/Plasma_6#Removals, I'm afraid KHotKeys has reached end-of-life in Plasma 6. Accordingly, all bug reports and feature requests for it must be closed now.

Most of what KHotKeys could do can already be done with the newer KGlobalAccel system in Plasma 6. A few features such as mouse gestures and triggering conditions based on changes to window states are not yet implemented in the new system. These will be added in the future if and when resources materialize for them, and/or when a kind soul submits patches to implement them! :) Meanwhile, the 3rd-party "Mouse Actions" app (https://github.com/jersou/mouse-actions) may be usable for implementing your own mouse gestures again.

Thanks for your understanding, everyone.