How to fix Conflicting accelerators
Andreas Pakulat
apaku at gmx.de
Tue Jun 16 11:42:33 BST 2009
On 15.06.09 22:56:44, Albert Astals Cid wrote:
> A Dijous, 11 de juny de 2009, Andreas Pakulat va escriure:
> > we have an interesting problem in KDevelop because there are two
> > conflicting accelerators. KDevelop embeds kate, which has this nice search
> > bar with Next and Prev buttons. Kate also assigns accelerators to these
> > buttons (Alt+N and Alt+P). Now the problem is that the automatic
> > accelerator-assigner (KAcceleratorManager IIRC) in kdelibs doesn't know or
> > care about that (probably know because no kate search bar is visible during
> > startup). And KDevelop has a "Navigation" menu, which gets Alt+N
> > assigned as accelerator via the kdelibs code (one more reason why
> > the automatic assignment really should be turned off).
>
> What does his have to do with automatic assignment? Disabling it would not
> solve your problem at all.
It would solve this problem because then KDevelop wouldn't have any menu
accelerators :) And we get to decide which ones to use for the menu, as
opposed to an algorithm that only cares about the menu and not the rest of
the application (or that isn't re-run when the GUI changes).
> > Thats a clash, apparently Qt doesn't care which component in the gui has
> > focus it always activates the menu.
>
> That would seem a bug to me, at least on the menu when there are two items
> with the same accelerator it switches between them.
Yeah, maybe.
> > So what can be done about this, anybody with a good idea? I don't think
> > kate devs want to change kates accelerator as Alt+N fits very well with
> > "Next".
>
> I'm not sure if QShortcut and it's ambiguous flag is also used for
> accelerators or not, anyone knows?
Probably not, a quick look at QAbstractButton and QWidget confirm that
suspicion.
Andreas
--
You're a card which will have to be dealt with.
More information about the kde-core-devel
mailing list