Last step for accesskeys...

Lubos Lunak l.lunak at suse.cz
Wed Jul 28 10:54:21 BST 2004


On Wednesday 28 of July 2004 13:35, bj at altern.org wrote:
> >  It can be actually even three times if sticky keys are configured to
> > lock, but that seems to work as well. It however ceases to work if you
> > turn NumLock on. KApplication::keyboardModifiers() includes the NumLock
> > state (David and Michael Matz apparently weren't aware of the certain
> > idiotic details of X's modifiers handling).
> >
> >  Can you explain why exactly is that call needed? The event's state() or
> > stateAfter() should give you the same information, without this problem.
>
> Right, I missed the numlock stuff! The KApplication::keyboardModifiers() is
> required for sticky keys, because we only want to activate when the ctrl
> key is released. If you use state(), you can't make the difference between
> the first and the second ctrl key release when sticky keys is on. I didn't
> try stateAfter() since the doc says:
> Warning: This function cannot be trusted.
> Attached is a patch fixing this issue (but still using
> keyboardModifiers()).
>
> >  When I press Ctrl twice it still keeps the accesskeys activated. It'd be
> > nice if the second press would turn it off again instead of me having to
> > press Esc or wait, if this is supposed to be not very intrusive.
>
> Attached is a new patch that fixes (hopefully) all issues, but it requires
> to include file kkeyserver_x11.h. I don't know if there should be some
> #ifdef in case it is compiled without an X server ?

 You don't need that X11 include, KApplication::ControlMask should work there 
as well. I already complained at kde-core-devel@ about 
KApplication::keyboardModifiers().

> Otherwise, it now works with Numlock or scrolllock,...
> It now also works if the accesskey is a Caps.
>
> I changed the accesskeys popup display to disappear when ctrl is pressed
> again.
>
> Let me know...

 Seems to work fine. Now we need somebody bored enough to make some WWW pages 
actually use it :-/.

 PS: Please add the accesskey support to 
developer.kde.org/development-versions/kde-features.xml, so that it's also in 
the 3.3 changelog.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kfm-devel mailing list