[Patch] Fixing the Access Key system

Lubos Lunak l.lunak at suse.cz
Wed Jul 14 10:08:55 BST 2004


On Monday 12 of July 2004 16:52, bj at altern.org wrote:
> Currently, the accesskey support is broken since it conflicts with system
> wide shortcuts. If you have an accesskey="l" in a web page, you end up with
> a locked Desktop!

 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 :(.

>
> I created a patch that changes the behaviour to this:
> To enable accesskey, you need to press "Ctrl" and then the accesskey.
> Example:
> Pressing "Ctrl+a" will behave as a normal konqueror shortcut.
> Pressing "Ctrl" and then key "a" will activate the "a" accesskey (there is
> a 5 second timeout for the second key).

 It'd be probably better if there was a normal shortcut for this rather than a 
single modifier key. For people preferring keyboard (and those are more 
likely to use accesskeys) Ctrl is not that rarely used key, and this could 
interfere. I've already noticed a similar problem with the 
Ctrl-suspends-Alt-arrows-scrolling feature, just e.g. switch virtual desktops 
(or even just intend to and then change your mind) and you have Ctrl pressed.

 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.

>
> Additionnaly, (and this can be removed from the patch if necessary), If you
> press "Ctrl" again, small passive popups will appear in front of each
> element in the page with an accesskey, showing that accesskey. (I must say
> i love that feature, and it is a nice way to "emphasize" the role of the
> accesskey as recommanded by the W3)

 Great idea. But I don't like the implementation - the passive popups are not 
really part of the html widget. Which means they don't scroll together with 
the page, and they stay on the screen if you change active window/desktop. 
They also don't go away after you actually press the accesskey. Would it be 
possible to e.g. use QLabel, reparent it to the khtml widget and keep them as 
the topmost children?

>
> 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.

> What do you think about it ?

-- 
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