Summary: | Standard shortcuts for applications with same assignment on standard and alternative give error message being ambiguous in applications (e.g. Kate) | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kxmlgui | Reporter: | Marcel <qwc+bugs.kde> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | achilleas.k, anohigisavay, bugs.kde.1933, chriswhy, clearmartin, craig.finnegan, cyberbeat, farseerfc, freddie_chopin, gm_tnd, jean-pierre.hoehmann, johnsc301, kde, kde, kdebugs, lupus_in_fabula, mark_p._sanders, massimiliano.torromeo, max, maxrd2, Nicky726, pfoo, pietz, rafaelalcantaraperez, simon.persson, sledge.sulaweyo, sleepywitti+linux, syiad.al-duri, vayu, vjuranek, vleett, wio, zmogas |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-desktop/3afd24f55dcba2cd389c3760d1661dabb9251d14 | Version Fixed In: | 5.4.1 |
Sentry Crash Report: |
Description
Marcel
2015-02-01 20:19:12 UTC
Oh. Forgot to add: When I remove the alternative from that ambiguous shortcut, the alert message goes away and the command is executed. I have the same problem with my Plasma 5.2.0 on Arch Linux. The problem is temporarily fixed by removing one of shortcut/alternative (though it does not work out every time) but it does not persist over application restart. The only workaround I've found is a creation of a new shortcut scheme (under "Details >>" button). When I restart application (namely Kate) the new shortcut scheme has empty name in the selectbox but this is OK with me or maybe for a different bug report. KHotkeys only deals with global shortcuts for launching apps. Moving to kxmlgui which is where that error message is coming from. I can't reproduce here; Kate isn't defaulting to having control+s as a primary and alt shortcut. Are you saying it defaulted to that? *** Bug 343711 has been marked as a duplicate of this bug. *** I have same problem and have investigated for a bit.. After customizing shortcut with KShortcutsDialog it prepends Primary and Alternate shortcut to QList<QKeySequence> so it ends up being a pretty long list of duplicate shortcuts after awhile. Maybe it doesn't actually prepend two to the list, but result is the same. The list has two shortcuts you defined and after it are previous or default shortcuts which cannot be edited/removed without editing the .rc file. Have created a patch here: https://github.com/maxrd2/kxmlgui/commit/966f6ad78a4831f49e1bfb759315b7499346b9d5 (sorry not sure how to submit patch here) Every time list is updated or read, It deletes all entries behind first two. It doesn't remove the cause, but it's temporary solution that works for me. Hope it'll help before it's fixed properly. This has been happening to me with KWrite. Most shortcuts are "ambiguous" and the problem keeps coming back. Hope this gets fixed soon. Like I wrote before I also have this problem but now I've tried with new user (with empty home folder). There was no ambiguity in kwrite/kate shortcuts until I changed a shortcut in System Settings -> Shortcuts -> Application Keyboard Shortcuts (specifically it was "Cut" - removed alternate shift+del). Max is probably more in depth in this :) I don't understand the technical details. Late answer to David Edmundson: No, control+s is not a primary and alternate shortcut by default. Only after altering "Application Keyboard Shortcuts". I've also noticed when in "Application Keyboard Shortcuts" if you are clicking Defaults and Reset buttons multiple times in the loop - lines in table are duplicating. But this is probably just a visual bug. Same here - after upgrade to Plasma 5 applications like Kate or Kwrite are just unusable. For me even such trivial things like End or Home don't work at all, while PgUp or PgDown gives the error about ambiguity. Maybe it would be enough just to delete all Kate/Kwrite configuration that exists, so it would start "fresh"? OK, maybe I have a lead here. There's a ~/.config/kdeglobals config file that has shortcuts. After I first looked there, the [Shortcuts] sections looked like a total chaos, so i renamed the file and relogged. After that if you just start Kate/Kwrite, most of the shortcuts work fine - copying, pasting, PgUp or PgDown. But if you just go to shortcut options of KDE, restore defaults and apply that, the chaos reappears. For example, I just did that (restored default shortcuts and applied, this is only a part of what appears in this file: --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- [Shortcuts] Activate Next Tab=Ctrl+]; ; Ctrl+] Activate Previous Tab=Ctrl+[; ; Ctrl+[ AddBookmark=Ctrl+B;\s Back=Alt+Left; Back; Alt+Left; Back Begin=Ctrl+Home;\s Close=Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc Copy=Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins Cut=Ctrl+X; Shift+Del; Ctrl+X; Shift+Del ... --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- Now the funny thing is that if I do the same thing again, the chaos gets even worse, because another pair shortcuts is added everywhere... The same fragment after first iteration: --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- [Shortcuts] Activate Next Tab=; Ctrl+.; Ctrl+] Activate Previous Tab=; Ctrl+,; Ctrl+[ AddBookmark=Ctrl+B; ; Ctrl+B Back=Alt+Left; Back; Alt+Left; Back; Alt+Left; Back Begin=Ctrl+Home; ; Ctrl+Home Close=Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc Copy=Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins Cut=Ctrl+X; Shift+Del; Ctrl+X; Shift+Del; Ctrl+X; Shift+Del ... --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- Another iteration: --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- [Shortcuts] Activate Next Tab=Ctrl+]; ; Ctrl+] Activate Previous Tab=Ctrl+[; ; Ctrl+[ AddBookmark=Ctrl+B; ; Ctrl+B; Ctrl+B Back=Alt+Left; Back; Alt+Left; Back; Alt+Left; Back; Alt+Left; Back Begin=Ctrl+Home; ; Ctrl+Home; Ctrl+Home Close=Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc Copy=Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins Cut=Ctrl+X; Shift+Del; Ctrl+X; Shift+Del; Ctrl+X; Shift+Del; Ctrl+X; Shift+Del ... --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- Each time I do that, another pair appears... The problem sort-of persists if I create a new user with new home folder. At first the shortcuts work fine, but as long as I restore default shortcuts almost the same thing happens, but only to part of the shortcuts. For example Ctrl+C and Ctrl+V stop working, but Home, End, PgUp and PgDown work fine. (In reply to Freddie Chopin from comment #10) > The problem sort-of persists if I create a new user with new home folder. At > first the shortcuts work fine, but as long as I restore default shortcuts > almost the same thing happens, but only to part of the shortcuts. For > example Ctrl+C and Ctrl+V stop working, but Home, End, PgUp and PgDown work > fine. If you feel like compiling/building your own package you can get patched sources here that have that issue fixed: https://github.com/maxrd2/kxmlgui/ It's temporary solution I use until it gets fixed upstream in KDE Here's PKGBUILD if you use arch linux: http://pastebin.com/75aLDu4v This commit look suspicious - https://projects.kde.org/projects/frameworks/kxmlgui/repository/revisions/c94ade60e4fb5f81467079706a18cca6c5e9081c or in Max's github https://github.com/maxrd2/kxmlgui/commit/c94ade60e4fb5f81467079706a18cca6c5e9081c I wonder if clean kxmlgui with this single change reverted would still show the problem... Someone submitted another bug report: https://bugs.kde.org/show_bug.cgi?id=345807 Not the same symptom but they are related and seem to have a same cause. That's exactly the same thing I wrote in comment #9 - that's the same issue. *** Bug 345807 has been marked as a duplicate of this bug. *** Same Problem here, very annoying Just info: the problem persists with kxmlgui 5.10.0 (arch linux). Created review request just now with a fix for this one. https://git.reviewboard.kde.org/r/123828/ Same problem here on 5.11.0 after adjusting the keyboard shortcuts in systemsettings. I deleted all the entries for [Shortcuts] in kdeglobals ~/.config/kdeglobals and all seems well again for kate. I confirm it on Kubuntu 15.04 with KDE5, very annoying. Also Konsole has a shortcut unfixed troubles (described in #343711). The bug is about a half a year old. Moral: Never ever update to a new version of KDE in first 1-2 years, it's always a pain, I also can confirm this. Since Plasma 5 I am going to hate nearly every KDE application because this damn error message pops up every minute when you are a poweruser and are used to use shortcuts. Please fix this fast! I am wondering why none of the main developers uses shortcuts and gets an error message... What desktop do you use? Maybe I should switch, too :-) Is anyone else getting a crash when this happens? Everytime I hit a hotkey (Ctrl+something) kate crashes right as it throws this same ambigious error. Haven't tried checking yet with debugging or anything but just from the cmd line it's segfaulting (hitting Ctrl+S when open, or anything for that matter) kf5.kservice.sycoca: Trying to open ksycoca from "/home/x/.cache/ksycoca5" Calling notify on "Sound" [1] 14681 segmentation fault (core dumped) kate Sorry can't edit, forgot to include some further info on the above: Running arch linux all latest, kate 15.04.3-1 plasma-workspace 5.3.2-2 plasma-framework 5.12.0-1. Unfortunately even after recompiling the packages for plasma/etc with debugging options dr konq is still showing the proper debug files missing but that's another/separate issue. Running the same just with gdb, target exec /usr/bin/kate, run : kf5.kservice.sycoca: Trying to open ksycoca from "/home/craig/.cache/ksycoca5" Calling notify on "Sound" [New Thread 0x7fffe1f63700 (LWP 15148)] Program received signal SIGSEGV, Segmentation fault. 0x00007fffd28d9c34 in ?? () from /usr/lib/libQtGui.so.4 I'm recompiling qt5 with debugging options but will take a while and recheck. Also tried reinstalling kate to no avail. Not sure when the issue started showing but typically I use kate frequently and just noticed it the past 4 days or so probably, didn't notice the ambigious error until ran it through gdb which halted it long enough for me to see the error popup (with nothing in it just the title) At some point in the recent past many shortcuts/hotkeys were duplicated, not sure how/why that happened but had to be in the past weeks. Upon realizing that I removed all the duplicate/identical secondary shortcuts and that resolved both the error and the crash/segfault. Not sure how/why that happened to begin with though as very odd. I know everyone who needs to know how this bug is reproduced probably knows already, but I made a video that shows how it works a while ago and I neglected to post it. Here it is now, for anyone coming across this bug and still wondering what exactly is going on. I hope it clarifies a few things and helps users work around it, or at least understand what's happening (for sanity's sake). https://youtu.be/vs65DEX0Bkc Any chance this will ever get fixed? I used to love KDE 8and i really still do), but right now it seems throwing it out is my only option :( (In reply to jean-pierre.hoehmann from comment #26) > Any chance this will ever get fixed? I used to love KDE 8and i really still > do), but right now it seems throwing it out is my only option :( When I first tried Plasma 5 I almost immideately experienced this bug and decided to switch back to 4.X... if not even such a basic thing works then I thought it was not worth my time yet. When later I tried switching and it still was not fixed I decided to fix it, took half a day. The fix is linked in comment 18 here. Despite sending reminder to mailing list about it last month there still has been zero replies from the maintainers. For now, to work around, just open the "kdeglobals" file under the "~/.config" folder and erase all the shortcut entries there. That gets you back to standard shortcuts without conflicts. Please fix this ! Its damn annoying I agree with lots of you: this bug is bothering. Anyway, Kate is the only application where I found this bug even though I still think it's global. @Craig it crashes to me too. When it happens the cursor gets invisible for at least 10 seconds, then a crash with all the trimmings. The backtrace is the same of yours. I just got this bug on Dolphin after upgrading it to 15.08.0 I first experienced this on Kate after upgrading to Plasma 5.3 Dolphin was fine until the upgrade to the new dolphin OK So, I have an obnoxious workaround: In Dolphin for eg., go to the shortcuts settings. You have a list of shortcuts, take note of "Shortcut" and "Alternate" Click on a shortcut and set it to None, and click on another shortcut. You'll notice that the Alternate shortcut is not filled with what was in the Shortcut section. Take Dolphin and "Copy" for example. The standard shortcut is Ctrl+C After the upgrade to Plasma 5, I saw some shortcuts had the shortcut repeated in both Shortcut and in Alternate. However, I was still getting errors despite getting rid of the duplicates I clicked on the standard Shortcut for Copy in Dolphin and set it to None When I clicked on the next shortcut, the Copy Alternate becomes Ctrl+C I set that to none and Shortcut to Ctrl+C, and now, the Ambiguity error is gone. Here is a video of me demonstrating my workaround: https://www.youtube.com/watch?v=eSXP8LdtzZk At first I thought eliminating those ambiguities manually would have been useful; as a matter of fact, Kate didn't work anyway after its restart. Editing .config/kdeglobals worked for me *** Bug 345542 has been marked as a duplicate of this bug. *** Git commit 3afd24f55dcba2cd389c3760d1661dabb9251d14 by Simon Persson. Committed on 07/09/2015 at 02:05. Pushed by persson into branch 'Plasma/5.4'. Fix KF5 port regression in kcm_standard_actions The KShortcutsEditor reads the property "defaultShortcuts" from the assigned QAction. This commit changes KCM code to correctly fill in QActions with default "hardcoded" shortcuts. Previously it was appending the defaults to the list of active shortcuts, but that just creates shortcut lists that grow longer and longer every time user saves settings in this KCM. FIXED-IN: 5.4.1 REVIEW: 123828 M +2 -3 kcms/standard_actions/standard_actions_module.cpp http://commits.kde.org/plasma-desktop/3afd24f55dcba2cd389c3760d1661dabb9251d14 In reply to Simon Persson from comment #27) Sorry for not replying to our comment, I was really busy and forgot about this. I had seen your patch, but I had decided, that "if not even such a basic thing works then it was not worth my time yet." However, I am back in KDE by now (and using your patch), so I just wanted to leave a quick thanks for fixing this : ) Hell yeah, thanks for fixing this! :) Short question: the message above says that this issue is fixed in 5.4.1 which at least for me isn't true. Was the patch just too late and will be in 5.4.2 or did it somehow not fix the issue on my system? I can confirm, that the fix is in 5.4.1 and works for me. Strange because I still have to remove all the duplicate shortcuts in kdeglobals after changing them from systemsettings. After I do that, it works fine except for Ctrl+V which is still ambiguous in Kate even if I delete the whole [Shortcuts] section. The issue is 100% reproducible. Do you need to delete the duplicates everytime or only once? I do not know if the fix will delete the duplicates that already exist. The bug does still exist in Arch Linux which uses unpatched sources of KDE (plasma-desktop-5.4.1.tar.xz). When I apply the patch and build the package by myself everything works just fine - thanks a lot for fixing this annoying bug! I have to delete them every time. And as I said, even when I do, Kate still says that Ctrl+V is ambiguous (Ctrl+C, Ctrl+A etc. all work, though). Oh, I see. So, this is not officially in 5.4.1 but a separate patch? I'm using Chakra Linux which is based on Arch. Will it be in the 5.4.2 tars then? I am running KDE 5.4.1 on Arch Linux and have uninstalled the patch recently, the fix is definitely in and working here. I am running plasma-desktop 5.4.2 and experience this in Ark. I don't experience it in Kate, or any other app. If I open up a compressed find, opening a file with Ark and utilizing Ctrl+F will give me the ambiguous shortcut dialog. This bug should make all shortcuts ambigous, after changing then once. If you are having problems with specific shortcuts, you should double-check, that the shortcut is not, in fact, ambigous. Note that in some applications (not sure about Ark), the defaults contain ambiguities. For instance the shortcuts 'del' is ambigous in kMail by default (assigned to both 'Delete' and 'Move to trash'). I just tested on 5.4.2. Problem seems to be gone. I still had to resolve an ambiguity for Ctrl+V in Kate, but I could do that via Settings menu->Configure shortcuts. Now it works. In the version before the shortcut stayed ambiguous, no matter what I tried. I just ran into this problem with Kid3. There aren't any ambiguous shortcuts, but I'm getting the popup. When I do my trick when I set the default to Custom and back to default, the Alternate shortcut becomes the default, showing the ambiguity. I had this problem still with Version 5.4.2. I had to delete the shortcuts section in .config/kdeglobals to get rid of this. The solution in Comment 50 worked for me! Thank you That are basically two issues here - right? 1. Something is adding cloned shortcuts (two shortcuts for the same thing). 2. The error messages that come up when such a configuration exists. It shouldn't be an issue at all if there is such a situation. The same shortcut for an action should be handled as if it was configured just once. Or am I totally wrong here? I still have the problem on a fresh install of Kubuntu 15.10 with Plasma 5.4.2. The solution proposed in Comment 50 did not fix it for me. Now inserting via Ctrl+V works, but Ctrl+C and Ctrl+X still give the error message. Are there other legacy config files that I may have to clean up? I also am still having a problem for last 10 months. Have tried all of the proposed patches here, and only that really solves the problem for me is (ugly) one i made and explained in Comment 5. Does anyone knows what is actually appending those default shortcuts to the list? |