Custom keyboard shortcuts?

Hey guys,

New here :slight_smile: I’ve been the developer of In My Pocket addons for about 10 months now. Several of my users reported me the need for several keyboard shortcuts, and I agree with their idea. I noticed the commands API, but from what I can understand, this only allows static keyboard shortcuts that are to be defined once and for all in the manifest.json.

Is there any way to allow users to customize the keyboard shortcuts, or do I definitely have to define myself “hardcoded” keyboard shortcuts that won’t be editable? Looked around for this, but could not find any helpful information. Chrome has its own mechanism to allow customization of commands, but I don’t think this exists in Firefox.

Thanks for your help guys :+1:
Cheers

AFAIK there isn’t such API for WebExtensions. It is possible to add keyboard listeners to each page but that is just an ugly-hack.

Thanks for your answer :slight_smile:

Yep. Thought of this but I’m not so fond of the solution. I’ll go with a standard command for now then, I believe.

https://bugzilla.mozilla.org/show_bug.cgi?id=1215061

1 Like