Summary: | Configure Shortcuts dialog doesn't work with some Ctrl+Shift combinations | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Robin Pedersen <robinpeder> |
Component: | kdeui | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andresbajotierra, apaku, hector.acosta, kde |
Priority: | NOR | ||
Version: | 4.1 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Possible patch
A second take |
Description
Robin Pedersen
2008-10-21 18:57:28 UTC
Created attachment 28053 [details]
Possible patch
I think this is quite difficult to fix, because how QKeyEvent is implemented.
This patch kind of works, but it sets the shortcut to Ctrl+{ not Ctrl+Shift+[
In practice they are the same on my keyboard setup.
With the patch above, it's not possible to create shortcuts like Ctrl+Shift+A. Recently Michael (Jansen) told me that the bug is in Qt and needs to be fixed there. So please write to qt-bugs and inform one of our TT contacts about the urgency of this fix. Maybe it'll still make it into 4.5... I'm not sure if I agree that this is a Qt bug. If I understand it correctly, it's quite difficult to get this right with the current behavior of QKeyEvent. However, I wouldn't call it a bug, and a request to TT would be to change the current behavior or add a new feature, rather than a normal bug report. Created attachment 28062 [details]
A second take
This patch does the same thing with special characters like [{+, but allows Shift to be used as modifier with letters, function keys, Return, Space and Backspace.
I now agree it's not a qt bug. I got that information from someone else but after looking at the code noticed: 1. The shift handling is added by our code 2. qt's doc explicitly says it's not a good idea to do that. That's why i tried to find out the motivation behind adding the code. The motivation seems to be to allow handling of shift+<function keys> and to make the difference between ctrl-F and ctrl-f more visible or, as robin noted in his email, to make it possible to distinguish those to in the first place. That's why i favor Robins second patch allowing shift as modifier only for letters and function keys. @Robin I will test your patch and will most likely apply it. Or do you have a svn account? Mike I do have an svn account, but I think it's probably better if you do it. I'm on holiday atm, and it probably needs some improvement. It handles some keys like space, return and backspace, but there may be other keys that I didn't think of. SVN commit 876224 by mjansen: Itr started and ended fixing BUG: 173246 But it's much more. Until know the recording of shortcuts went like this: Press some modifiers, type some keys. The moment you released a modifier recording was stopped. There were some problems: 1. The resulting shortcut was not as expected CTRL-A,CTRL-B but CTRL-A,b. 2. It was impossible to enter CTRL-A,CTRL-B. 3. It was impossible to enter CTRL-A,SHIFT-B 4. (Bug 173246) This patch hopefully fixes all of them. M +58 -31 kkeysequencewidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=876224 Don't know if it is related, but as of kde 4.1.82 ctrl+alt+up and ctrl+alt+shift+up conflict with one another (the shift key is ignored) Here using: Qt: 4.4.3 KDE: 4.1.85 (KDE 4.1.85 (KDE 4.2 Beta2)) kdelibs svn rev. 896338 / kdebase svn rev. 896338 It seems that the "Shift" modifier isn't recognized in some situations. Testcase: - Open SystemSettings - Go to Keyboard & Mouse -> Global Keyboard Shortcuts Select a random Action "A", and assign a random keys combination (ex. "Ctrl+A") Select another Action "B" and assign it the same key combination plus Shift (ex. "Ctrl+Shift+A") A conflict window appears showing that "Ctrl+A" is already assigned to Action "A". (it displays both key combinations as "Ctrl+A", like the "Shift" modifiers wasn't recognized at all) This also happens with another combinations like "Ctrl+Alt+Letter" and "Ctrl+Alt+Shift+Letter" Can anyone confirm this? Thanks :) @Dario: Works for me, using beta2 and current trunk. SVN commit 900539 by rpedersen: Allow shift modifier with Up, Down, Left, Right and Insert keys. BUG: 173246 M +5 -0 kkeysequencewidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=900539 |