webextensions-lib-shortcut-customize-ui
Generates configuration UI for keyboard shortcuts, for WebExtensions-based Firefox addons.
Screenshots
Basic usage
Load the file ShortcutCustomizeUI.js
from any document (options page, sidebar panel, or browser action panel), like:
<script type="application/javascript" src="./ShortcutCustomizeUI.js"></script>
And, call ShortcutCustomizeUI.build()
. It returns a promise resolved with a DOM element:
ShortcutCustomizeUI.build().then(list => {
document.getElementById('shortcuts').appendChild(list);
});
Need controbution for internalitonalization
By default, shortcut keys and modifier keys are shown with their general name listed at the API document, but such raw key names may confuse people in some locales. Thus this project needs more help for internationalization/localization. Please pull requests to update the built-in definitions for localized key names.