Community
Participate
Working Groups
HTML objects can have an accesskey attribute that acts like key bindings/mnemonics in a regular UI. Help should make use of such keys, in particular in its working set dialogs or tabs/toolbars.
From w3c: accesskey = character [CN] This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey. Pressing an access key assigned to an element gives focus to the element. The action that occurs when an element receives focus depends on the element. For example, when a user activates a link defined by the A element, the user agent generally follows the link. When a user activates a radio button, the user agent changes the value of the radio button. When the user activates a text field, it allows input, etc. The following elements support the accesskey attribute: A, AREA, BUTTON, INPUT, LABEL, and LEGEND, and TEXTAREA. This example assigns the access key "U" to a label associated with an INPUT control. Typing the access key gives focus to the label which in turn gives it to the associated control. The user may then enter text into the INPUT area. <FORM action="..." method="post"> <P> <LABEL for="fuser" accesskey="U"> User Name </LABEL> <INPUT type="text" name="user" id="fuser"> </P> </FORM>
The accesskey works only when ALT is pressed together with the key. For mnemonics the keys should work without ALT to be consistent with the workbench. I will look at solutions that would involve key listener (onkeypress or onkeydown).
Actually it is correct to require ALT key. Eclipse works with ALT as well. It is only dialogs where shortcuts can work without ALT keys. I have implemented shortcuts and shown mnemonics in the labels for working set dialogs in help. The mnemonics are indicated by adding "&" character in after the mnemonic character in the labels in the properties, as is done for labels in SWT widgets. I also enabled Enter and Escape keys to confirm and cancel dialogs. On the main help window, I have added shortcuts to search field and working set link. What I did not do is to provide shortcuts for buttons in help toolbar. The reason is that the buttons are implemented as <a> elements not <button> elements. It causes the shortcut key combination to bring focus to the button but not execute the action on Internet Explorer. The buttons should be reimplemented as <button> elements. It makes sense to do this work when there will be redesign of look for Eclipse UI and Help UI, later in 3.0 cycle, rather than reimplement, tweak, and test now. Also some actions on the toolbar already have shortcuts (provided by the browser) Back, Forward, and Print can be executed by ALT-LEFT_ARROW, ALT-RIGHT_ARROW, and CTLR-P.
Marking as fixed. Dialogs got access keys.