Multikey shortcuts in kde 4.1 where officially supported. But the implementation wasn't what most of us expected. KKeySequenceWidget - responsibly for capturing key sequence from the user - had some annoying bugs.
KKeySequenceWidget is this small widget most of you will know. With kde 4.1 it had some shortcomings. The developer / code was able to use shortcuts like "ctrl-r, ctrl-t" or "ctrl-r, shift-t. The user was unable to assign these because KKeySequenceWidget couldn't handle them.
When capturing shortcuts it only allowed pressing one or more modifiers and then sequentially some keys. If one modifier was released the capturing stopped immediately. A modifier is one of shift, meta, alt or ctrl. Even if you had to hold down the modifier(s) all the time during the capturing, the resulting shortcut only had the modifier(s) on the first key. After for example pressing ctrl-r, ctrl-s while capturing, the resulting shortcut was ctrl-r, s. So you had to release ctrl before pressing s. It was not possible to switch modifier during the capturing.
With kde 4.2 the capturing goes on as long as a modifier is pressed. If the last modifier is released a timer starts. if the user presses a key before the timer ends the key is added to the sequence and the timer restarts. If the user presses a modifier before the timer ends the timer is stopped again and the capturing goes on.
With that scheme it's possible to record the weirdest shortcuts. Go ahead and assign "ctrl-r, meta-s, k, alt-s".
I would like to have some feedback on the usability and intuitiveness of capturing key sequences. Currently the timer isn't visualized. I think it should. Anyone else an opinion?
The maximum number of keys is currently hard coded as 4. With KKeySequenceWidget::setMultiKeyShortcutsAllowed() it's possible to only allow one key shortcuts. This is needed for global shortcuts because it's not possible to have multikey global shortcuts currently.
But before you get to creative with your shortcuts keep the ambiguity problem in mind. I will talk about this problem in one of my next posts. But in short. It's not possible to have both "ctrl-a" and "ctrl-a, shift-s" at the same time. KShortcutsEditor knows that and will warn you.
Mike

Recent comments
26 weeks 2 days ago
27 weeks 5 days ago
27 weeks 5 days ago
27 weeks 5 days ago
27 weeks 5 days ago
27 weeks 6 days ago
27 weeks 6 days ago
28 weeks 5 hours ago
28 weeks 9 hours ago
28 weeks 11 hours ago