Open
Bug 1173291
Opened 10 years ago
Updated 2 years ago
Add a shared utility to handle keyboard shortcut labels
Categories
(DevTools :: Framework, defect)
DevTools
Framework
Tracking
(Not tracked)
NEW
People
(Reporter: pbro, Unassigned)
References
Details
Attachments
(1 file)
19.33 KB,
image/png
|
Details |
Bug 1077339 just added a tone of labels for keyboard shortcuts within toolbox tooltips.
See https://hg.mozilla.org/integration/fx-team/diff/fa429d0aec1a/browser/devtools/definitions.js
They are very useful for users to learn how to access various tools from the keyboard.
I'm also about to add one more in bug 1172500.
See https://reviewboard.mozilla.org/r/10607/
It feels like this could be handled better in a shared module.
Comment 1•10 years ago
|
||
I notice that the tab tooltips is displaying shortcuts on osx as Cmd+AltK. The shared one should (I think) show it as Cmd+Opt+K which is how we show things in our documentation: https://developer.mozilla.org/en-US/docs/Tools/Keyboard_shortcuts
Comment 2•10 years ago
|
||
There is a little helper function that we use in a couple tests that we might be able to modify to generate this from a <key> element:
function synthesizeKeyElement(el) {
let key = el.getAttribute("key") || el.getAttribute("keycode");
let mod = {};
el.getAttribute("modifiers").split(" ").forEach((m) => mod[m+"Key"] = true);
info(`Synthesizing: key=${key}, mod=${JSON.stringify(mod)}`);
EventUtils.synthesizeKey(key, mod, el.ownerDocument.defaultView);
}
Comment 3•10 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #1)
> Created attachment 8617965 [details]
> tab-tooltip.png
>
> I notice that the tab tooltips is displaying shortcuts on osx as Cmd+AltK.
> The shared one should (I think) show it as Cmd+Opt+K which is how we show
> things in our documentation:
> https://developer.mozilla.org/en-US/docs/Tools/Keyboard_shortcuts
Went ahead and filed a separate bug for this issue to make sure it gets fixed separately - Bug 1173373
Updated•10 years ago
|
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•