AccessKeys solution

From MozillaWiki
Jump to: navigation, search

Here is a good solution for AccessKeys conflicts in Mozilla/Firefox.

We can solve all conflicts related to accesskeys in a the same way, as Konqueror developers did. In order to activate accesskey 'P' you don't press Ctrl-P/Alt-P/etc. Instead you can press Ctrl,P, i.e. you press and release Ctrl key and then press 'P'. This way is much more desirable, than blocking an accesskey or allowing a web page to block browser shortcuts (like "Print" or "Preferences" for above combinations). When user presses and releases Ctrl key we can also display accesskeys near each link (i.e. tooltips) and give list of accesskeys in a status bar. If user don't want to choose any accesskey he can press Ctrl key again or just press any key which is not defined in a current page as accesskey.

Another similar solution is to use Alt-A or another predefined combinations instead of a Ctrl key (e.g. you can press Alt-A,P). This may be useful in situations, where sending press&release event for Ctrl key is problematic:

  • There are no Ctlr key :)
  • Pressing Ctrl key is hard for the user, e.g. he uses a "sticky" keys (need to press twice on ctrl to "unstick" it) or "lock" feature (need to press three times on ctrl to "unstick" it)
  • The environment doesn't support sending an event for pressing Ctrl key without other keys