KPopupMenu (& hence K-Menu) keyboard navigation patch

Aaron J. Seigo aseigo at olympusproject.org
Sat Apr 27 21:58:30 BST 2002


On April 27, 2002 03:24 pm, Waldo Bastian wrote:
> On Friday 26 April 2002 04:05 pm, Aaron J. Seigo wrote:
> > On April 27, 2002 01:38 am, David Faure wrote:
> > > On Saturday 27 April 2002 09:18, Hamish Rodda wrote:
> > > > The attached patch changes the method of keyboard navigation of the
> > > > K-Menu and provides this fuctionality to any programmer using
> > > > KPopupMenu who chooses so. It does so with an incremental search
> > > > algorithm (eg. type "gr" for "graphics"), consistent with other areas
> > > > of KDE (eg. konqueror navigation), and gives user feedback by
> > > > underlining the currently entered key sequence.
> > >
> > > Sounds great - I'm missing keyboard navigation in e.g. Konqueror's
> > > bookmark menus, typing the first letters of the submenu to open etc.
> > > Would this method allow to do that?
> >
> > yes... this feature can be turned on in any kpopupmenu with a call to
> > setKeyboardShortcutsEnabled(true). so bookmark menus, quick browser
> > menus, the kmenu, etc... can all have the exact same (convenient)
> > behaviour ...
>
> Cool feature. Is there any reason why you would _not_ want to use it? Or
> stated otherwise, is there a reason why this can't be enabled for all
> popup-menus?

technically there is no reason why it couldn't be enabled for all menus.

but it does render normal menu shortcuts useless, so it is slightly less 
efficient in the case of short static menus. especially if those menus have 
multiple items with the same first letter(s).

as an example, in this kmail composer window that i'm typing right now to 
switch to a fixed width font i currently only need to do:

 Alt-V W

using the keyboard shortcuts i'd need to do:

 Alt-V f i <enter>

i think this method is only really a win on dynamic menus, especially larger 
ones. one could always try it for a few days enabled globally to see how it 
felt, though....

-- 
Aaron Seigo




More information about the kde-core-devel mailing list