[Patch] Fixing the Access Key system
Lubos Lunak
l.lunak at suse.cz
Wed Jul 14 12:26:25 BST 2004
On Wednesday 14 of July 2004 14:46, bj at altern.org wrote:
> On Wednesday 14 July 2004 09.08, Lubos Lunak wrote:
> > I used Ctrl+Alt, because that's how Mozilla does it, and some pages
> > advertize it that way (e.g. linuxtoday.com). The conflicts with global
> > shortcuts are bad, but I'm afraid we can't require everybody to have
> > 4-modifiers keyboards :(.
>
> No, Mozilla and Firefox use the Alt+key system
> (http://www.mozilla.org/projects/ui/accessibility/accesskey.html)
Hmm, ok. Linuxtoday.com claims it's Ctrl+Alt and with Alt pressed it works
regardless of the Ctrl state, so I though it was Ctrl+Alt.
> > With your implementation global shortcuts actually don't work at all,
> > because it grabs the keyboard, but that's hardly better (type-ahead find
> > has the same problem). Can't you do without the grabs? If there's
> > something possibly eating the keypresses before, simply temporarily
> > install a global event filter and remove it again when done or on
> > focus-out.
>
> Well in fact I did put the grabkeyboard() because I took example on the
> type-ahead feature, but in fact it works well if I remove the
> grab/releasekeyboard() calls.
> As my access key system proposal reacts on key release event, it can easily
> be adapted in such a way that it _only_ reacts if Ctrl was pressed and
> released and no other key was pressed in the meantime. (see new patch
> attached) Also, I added a check, so that if the accesskey system is
> activated and you press any modifyer (ctrl, alt,...) it immediatly disables
> the accesskey sytem.
> With these extra checks, I don't think it can interfere anymore with other
> keyboards events.
There's still a possibility, as global shortcuts are done using passive
grabs, and the app wouldn't get those keypresses. It'd need some X11 hackery
to get it 100% right, and I haven't actually noticed any problem, so it's
hopefully not necessary. I still have removing the grabbing for type-ahead
find marked in my TODO though.
> > > This new behaviour could be advertised in konqueror's about: page.
> > >
> > > It would fix #45788 and #83053
> >
> > #45788 probably can't be closed yet, as the accesskeys support is not
> > complete. E.g. checkboxes still don't really work.
>
> They should now work correctly since we recently committed a patch fixing
> the issue.
Aha, ok, I had a slightly older build. It seems to work now.
>
> Attached is a new patch fixing a few conflicting issues and removing the
> display all access keys feature, since it probably needs a rewrite. At
> least, I think we should today commit a patch that displays a message in
> the status bar when the access key modifier is pressed. Will be back in 5
> hours, comments welcome
The part of the statusbar text talking about showing all accesskeys shouldn't
be shown as it's not true with this patch (I think having it in #if 0 should
keep it included for translation in case this feature makes it in 3.3 - it'd
be nice to have it). Also, I think the text should have higher statusbar
priority, otherwise it's not shown if e.g. the page shows something in the
statusbar.
BTW, please use -p when creating diffs.
--
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