Open Bug 1240350 Opened 9 years ago Updated 1 year ago

[tracking] Commands API support for WebExtensions

Categories

(WebExtensions :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: thenlich+bugmoz, Unassigned)

References

(Depends on 4 open bugs, Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, meta, Whiteboard: [commands]triaged[tracking])

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:43.0) Gecko/20100101 Firefox/43.0 Build ID: 20160105164030 Steps to reproduce: Tried to implement an extension that uses hotkeys to run commands. Actual results: Found out that the commands API is not supported. Expected results: The commands API should be supported, eventually.
Severity: normal → enhancement
Severity: enhancement → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [commands]
Priority: -- → P2
Whiteboard: [commands] → [commands]triaged
Whiteboard: [commands]triaged → [commands]triaged[tracking]
Depends on: 1246024
Depends on: 1246028
Depends on: 1246029
Depends on: 1246031
Depends on: 1246032
Depends on: 1246034
Depends on: 1246035
Depends on: 1246038
Depends on: 1246042
Assignee: nobody → mwein
Iteration: --- → 47.2 - Feb 22
Iteration: 47.2 - Feb 22 → ---
Depends on: 1251795
Iteration: --- → 48.1 - Mar 21
Keywords: dev-doc-needed
Iteration: 48.1 - Mar 21 → ---
Summary: commands API not supported → [tracking] Commands API support for WebExtensions
Any chance we could get this documentation added to MDN for Firefox 48 Will?
Flags: needinfo?(wbamberg)
Some docs: manifest key: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/commands JS API: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/commands I've also added the compat data, so it shows up in pages like https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs#commands. Please let me know if you think this covers it. A few things came up, most of which I have filed bugs for. But a couple of things I didn't because I wasn't sure they are bugs: * Chrome does not allow "Command" as a modifier, but we do. Is that intentional? * I couldn't get any shortcuts of the form <modifier>+Shift+<number> to work at all (I can register them, but onCommand isn't triggered). Maybe they are all just taken by the browser?
Flags: needinfo?(wbamberg) → needinfo?(amckay)
Flags: needinfo?(mwein)
(In reply to Will Bamberg [:wbamberg] from comment #2) > * Chrome does not allow "Command" as a modifier, but we do. Is that > intentional? Interesting. I think we read "on Mac 'Ctrl' is automatically converted to 'Command'" as suggesting that "Command" was valid on OS-X. I'm not sure if we should change that. > * I couldn't get any shortcuts of the form <modifier>+Shift+<number> to work > at all (I can register them, but onCommand isn't triggered). Maybe they are > all just taken by the browser? That's interesting... We definitely have tests for that. But it looks like we only have tests for Alt+Shift modifiers. We should probably test other combinations as well. Can you file a bug?
Thanks Will, looks good.
Flags: needinfo?(amckay)
(In reply to Kris Maglione [:kmag] from comment #3) > (In reply to Will Bamberg [:wbamberg] from comment #2) > > * Chrome does not allow "Command" as a modifier, but we do. Is that > > intentional? > > Interesting. I think we read "on Mac 'Ctrl' is automatically converted to > 'Command'" as suggesting that "Command" was valid on OS-X. I'm not sure if we > should change that. > > > * I couldn't get any shortcuts of the form <modifier>+Shift+<number> to work > > at all (I can register them, but onCommand isn't triggered). Maybe they are > > all just taken by the browser? > > That's interesting... We definitely have tests for that. But it looks like we > only have tests for Alt+Shift modifiers. We should probably test other > combinations as well. > > Can you file a bug? -> bug 1272198.
The docs look good, thanks! One thing that I think we should make note of is the fact that the Media Keys currently aren't supported. The bug to track support for this is bug 1251795. Also, thanks for filing bug 1272198. I initially thought certain modifiers weren't working because they were already reserved, but the amount that don't work seems excessive. I'll see if I can figure out what's going on and then add some unit tests to cover the other combinations.
Flags: needinfo?(mwein)
(In reply to Matthew Wein [:mattw] from comment #6) > The docs look good, thanks! One thing that I think we should make note of is > the fact that the Media Keys currently aren't supported. The bug to track > support for this is bug 1251795. Oh, good call. I have added this.
Depends on: 1295276
Depends on: 1303384
Assignee: mwein → nobody
Component: WebExtensions: Untriaged → WebExtensions: General
I am a bit unsure what the status of this bug is. It seems like there is some support, but I just tried porting my add-on that uses Ctrl-Space and Ctrl-Shift-Space and those don't. Numbers don't seem to work either and they should. If I replace Space by something else without changing the rest of the code it does work. However, If I use a letter that is already used, it won't work either. But it's not possible to know beforehand whether something will cause a conflict with existing shortcuts? Also, there is no way to edit shortcuts like there is in Chrome. There really should how else will it be possible to detect/fix conflicts? Tested with Nightly 53.0a1
No longer depends on: 1303384
This is a tracking bug to track all the bugs around getting to chrome parity for the commands API. Discreet features or bugs are tracked on individual bugs. Please add in bugs for those issues so people can pick them up.
Dropping priority of the tracker to match the dependencies.
Priority: P2 → P3
Product: Toolkit → WebExtensions
Depends on: 1411795
Depends on: 1654403
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.