The reason i work on global and local shortcuts is because i care about them. I use heavily adapted desktop setups both under linux and windows. And that for years. Global shortcuts are an important part of these setups. Having to use the mouse makes me itchy.
Over this i time developed a global shortcuts setup that works for both on windows and linux. I tend to get angry if one of them doesn't work. Using them for more than five years makes me trying to use them unconsciously even if i know they don't work. Which frustrates me.
The same could be said for application local shortcuts. If i use a application regularly and notice it is difficult to use with keyboard shortcuts or it's difficult to set them up i tend to discard the application. One of the greatest sinners in that regard is firefox. Firefox has no shortcuts configuration dialog. This is no problem if you use a standard firefox installation. But add some modules and things get really messy. There is a extension called keyconfig that is not available from the official site. You have to download it from some really dubious web site. Having a look at my firefox installation with that module i see 18 key sequences assigned to more than one action, with 5 of them used three times. I have currently twenty modules installed. And what happens if you type such a sequence is undefined. If you are lucky nothing happens. If not ...
But what is the problem here? The problem is module/plugin developers thinking only of their module and assigning a shortcut to each possible action. One of my favorites are those that add shortcuts to the "about xyz" or settings actions. Like the author of the "All in one sidebar". At least it clashes with no other shortcut. Yep i think i will open that dialog once a day from now on to make sure my configuration is still there. The problem is i never changed the configuration. Perhaps i will do it tomorrow. I know now how to get there real fast.
Until today in kde triggering a ambiguous shortcut had no result. Nothing happened You typed the key sequence, but none of the conflicting actions triggered. That is ok because nothing unplanned could happen. But a user could get very frustrated. This user once got VERY frustrated because of that behavior. I today commited a patch changing that nothing to a nice little message box telling what happened.
The problem gets even more complicated with global shortcuts. With global shortcuts the offending application isn't easily found. So your global shortcut stopped to work? Why? If you are lucky again - and i know you are a lucky one - the other application will do something really visible, if not you are out of luck. Like me. A week ago i was debugging kate because the shortcut "CTRL-SHIFT-I" stopped working. Imagine me happily (or not) trying to figure out why. In this exact same moment someone complained on irc that kopete steals that shortcut from kate. Thank you very much. Debugging stopped. Problem solved. Kopete uses that shortcut for incoming messages. I didn't even new that. And i had none. I mean incoming message. So nothing happened. I definitely haven't given my consent to that. i just started the application.
Sorry to say that i see no possibility to provide one of those nice message boxes telling you that bad kopete just captured the shortcut you meant to send to kate. Sorry. Perhaps if you ask lubos.
So if kde core projects aren't able to avoid that, what do you think happends if third party applications enter the picture.
So fellow developers out there. Be nice and assign default shortcuts for global shortcuts sparingly. Please ... for me. And if you do make sure the user sees something when the global shortcut is triggered. Please. Just a nice little note. Like "Dear Mike ... you have no friends ... hence no message."
Mike
Comments
Chani: That's why i offer my help
Just write up your use cases regarding global shortcuts. Explain what you want to do. Not why you think the current api doesn't provide what you need. That seems to be the only thing people try to explain to me.
Instead focus on what you are trying to do with plasma and we will come to an solution. Completly ignore the current framework with your use case.
Like i did for Lubos "Window Shortcuts" it is possible to enhance the kde4 shortcut api to provide better usage.
Mike
ick
Shortcuts
It seems to me that the right solution is to do two things:
1. Make sure that the user can see, modify, and customize global shortcuts and the shortcuts for ALL applications in a centralized place (i.e. a systemsettings dialog). This dialog should be able to automatically detect it when the user tries to assign a shortcut that is already taken to a new action and alert the user.
2. Either:
A. Introduce some sort of priority or scoping system to resolve conflicts.
B. When a shortcut conflict occurs pull up a dialog that allows the user to choose which shortcut they intended to use AND gives them an opportunity to remap one of the shortcuts to some other key sequence.
Proper separation of assignable shortcuts
qt defined shortcuts
PrtScn
Kopete-KWrite/Kate bug
@Christoph & Mike: I filed this bug against Kopete last year. The bugtracker is down but you can try to check later: http://bugs.kde.org/show_bug.cgi?id=142875
I was suggesting that Kopete be the one to change it's keyboard shortcut for the simple reason that Ctrl+I/Shift+Ctrl+I for indent/unident pair is more "intuitive" than Shift+Ctrl+I for "Read Message", which is what Kopete labels that particular global shortcut. It's actually only today that I learn that it's for "read Incoming message".
That said, would it be possible to have a table of default global shortcuts that apps use so that devs can look compare it with their own app's global and local shortcuts?
Other conflicts
@Christoph: No i haven't yet filed a bug against anyone. Who is at fault here? I don't know.
@Yurij: There are more. We haven't found them all. There is for example krunner using
CTRL+ESCto show the system activity dialog. It just happens that this key sequence is a standard key sequence configured for the "close" action.And the main problem aren't the conflicts. If a conflict happens and i have no chance to notice it. That is bad. The "CTRL+ESC" conflict at least is easily noticed. I think it is possible to realize that the system activity dialog appears responding to the sequence. But kopete stealing a shortcut and giving no visual clue about it. That's bad.
mike
evil Kopete
ctrl+shift+I
Post new comment