fnxweb / urllink

URL Link Firefox and Thunderbird add-on
https://addons.mozilla.org/en-GB/firefox/addon/url-link/
8 stars 0 forks source link

Option for shortcut #4

Open LawnSounds opened 6 years ago

LawnSounds commented 6 years ago

I sometimes find it faster to just copy/paste words in a new tab for Googling something so i was wondering if you could implement an option for shortcuts? Eg. a shortcut for a list of the options or a shortcut for each option, eg. opening in a new tab unaltered and so on?

fnxweb commented 6 years ago

Yes, I had to drop keyboard shortcuts when I converted it to a WebExtension as it was about thing that's completely different now.

I seem to recall that they can be added, but have to be hard-coded, and I was worried about choosing something that clashes for people, and them but being able to change it.

Made more tricky by the different OS releases if Firefox have different built-in shortcuts as well!

Although I may be able to be a bit clever about the shortcut assignments... I'll have a play.

One thing that won't work yet is menu-option “letter” shortcuts (where the shortcut once the menu is up has an underscore under it). That is (still) in, but hasn't been implemented in Firefox yet.

When they've put the feature back in, I'll re-enable that in URL Link.

fnxweb commented 6 years ago

Wow, keyboard shortcut support for WebExtensions is a complete car-crash at the moment. I'll have a play, though, and see what can be done.

LawnSounds commented 6 years ago

The Emoji helper (Also called Emoji Cheatsheet) has a shortcut, although not customisable, here: https://github.com/johannhof/emoji-helper

fnxweb commented 6 years ago

Yeah, you can currently only add shortcuts to predefined functions (so I may be able to add one to pop up the submenu), but there's no API to change that shortcut (and if it clashes with a browser one, it's ignored), not is there a way to add further ones (so you can't have a shortcut for a custom URL Link menu entry). (e.g., see the manifest.json file for the Emoji helper where it sets — but that's for a popup not a context menu)

sigh

I'm following the Firefox bugs that are requesting a shortcut API, so that I know when I can do something. In the short-term, I'll see if one of the things that can be done with a shortcut is pop up the context menu options.