Bug 1647654 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Alessandro Castellani (:aleca) from comment #1)
> I would love to add these as I think they're more intuitive and accessible than the current accesskey we use (underscore a letter for ALT+* action).

There's a misunderstanding here. Even if you add shortcut keys to the menu labels, you'd still have to keep the accesskeys to make the *menu* itself accessible. Shortcut keys can only be used after closing the menu (so the menu is just providing this info for later use), access keys are for navigating the menu itself.

> I'm not sure if the platform actually support these as I've never seen them used.

What do you mean here? Access keys? They work on Windows, yes. I think Linux is supporting them, too. MAC does not support access keys from what I have read.

> Magnus, do you know if it's possible to add shortcuts inline a context menu item? Like we have in the main AppMenu?

Let me snatch this answer: Yes, definitely possible, we already display some access keys in the context menu of contacts in contacts side bar.
It's easy: Just add `key="keyId"` attribute to the menu item, as seen here:

https://searchfox.org/comm-central/rev/93db6b3c1403b18025e1ad81466979c5b4cd2772/mail/components/addrbook/content/abContactsPanel.xhtml#73-76

```
    <menuitem label="&deleteAddrBookCard.label;"
              accesskey="&deleteAddrBookCard.accesskey;"
              key="key_delete"
              command="cmd_delete"/>
```
(In reply to Alessandro Castellani (:aleca) from comment #1)
> I would love to add these as I think they're more intuitive and accessible than the current accesskey we use (underscore a letter for ALT+* action).

There's a misunderstanding here [EDIT: Yes, I misunderstood Alex, sorry... as we both agree that:]. Even if you add shortcut keys to the menu labels, you'd still have to keep the accesskeys to make the *menu* itself accessible. Shortcut keys can only be used after closing the menu (so the menu is just providing this info for later use), access keys are for navigating the menu itself.

> I'm not sure if the platform actually support these as I've never seen them used.

What do you mean here? Access keys? They work on Windows, yes. I think Linux is supporting them, too. MAC does not support access keys from what I have read.

> Magnus, do you know if it's possible to add shortcuts inline a context menu item? Like we have in the main AppMenu?

Let me snatch this answer: Yes, definitely possible, we already display some access keys in the context menu of contacts in contacts side bar.
It's easy: Just add `key="keyId"` attribute to the menu item, as seen here:

https://searchfox.org/comm-central/rev/93db6b3c1403b18025e1ad81466979c5b4cd2772/mail/components/addrbook/content/abContactsPanel.xhtml#73-76

```
    <menuitem label="&deleteAddrBookCard.label;"
              accesskey="&deleteAddrBookCard.accesskey;"
              key="key_delete"
              command="cmd_delete"/>
```
(In reply to Alessandro Castellani (:aleca) from comment #1)
> I would love to add these as I think they're more intuitive and accessible than the current accesskey we use (underscore a letter for ALT+* action).

There's a misunderstanding here. [EDIT: Yes, I misunderstood Alex, sorry... as we both agree that:] Even if you add shortcut keys to the menu labels, you'd still have to keep the accesskeys to make the *menu* itself accessible. Shortcut keys can only be used after closing the menu (so the menu is just providing this info for later use), access keys are for navigating the menu itself.

> I'm not sure if the platform actually support these as I've never seen them used.

What do you mean here? Access keys? They work on Windows, yes. I think Linux is supporting them, too. MAC does not support access keys from what I have read.

> Magnus, do you know if it's possible to add shortcuts inline a context menu item? Like we have in the main AppMenu?

Let me snatch this answer: Yes, definitely possible, we already display some access keys in the context menu of contacts in contacts side bar.
It's easy: Just add `key="keyId"` attribute to the menu item, as seen here:

https://searchfox.org/comm-central/rev/93db6b3c1403b18025e1ad81466979c5b4cd2772/mail/components/addrbook/content/abContactsPanel.xhtml#73-76

```
    <menuitem label="&deleteAddrBookCard.label;"
              accesskey="&deleteAddrBookCard.accesskey;"
              key="key_delete"
              command="cmd_delete"/>
```

Back to Bug 1647654 Comment 2