xpmn / firefox-to-deepl

Firefox extension. Highlight text on a web page and send it to DeepL
https://addons.mozilla.org/en-US/firefox/addon/to-deepl/
MIT License
88 stars 8 forks source link

Add keyboard shortcuts to resolve #1 #11

Closed zznidar closed 3 years ago

zznidar commented 3 years ago

Firefox extensions can have keyboard shortcuts (hotkeys, commands). While testing in the debugging mode, no additional permissions were needed for hotkeys to work.

This PR adds support for custom hotkeys. User can choose the hotkey in the Manage Extension Shortcuts settings.

The developer of the extension can suggest keyboard shortcuts by adding such a piece of code to the manifest.json: "suggested_key": { "default": "Alt+Shift+D" }

I haven't suggested any hotkeys in the PR, but you can do so. Fixes #1

xpmn commented 3 years ago

Works like a charm. Great job!