gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file
GNU Affero General Public License v3.0
15.16k stars 994 forks source link

Keyboard-only opening of the toolbar menu #1419

Open eugenesvk opened 6 months ago

eugenesvk commented 6 months ago

Is your feature request related to a problem? Please describe. I'd like to have a quick access to the selection of options of the toolbar button without using a mouse

Describe the solution you'd like A new shortcut that would open the context menu instead of launching the default operation

Describe alternatives you've considered (optional) Activate a general page context menu via a button, but that one is more busy and also doesn't support accelerator shortcuts

Additional context (optional) N/a

gildas-lormeau commented 5 months ago

Unfortunately, this feature is technically impossible to implement in an extension because there is no API for associating a keyboard shortcut with the context menu or its entries.

eugenesvk commented 5 months ago

That's unfortunate. Would it be possible to at least expose more commands to the Extension shortcuts (there are 3 currently: activate, save all tabs, save selected)

For example, I like your extensions selection helper, use it the most, and thus would love to be able to launch it to force ask for selection (even if something is already selected for other purposes, I mentally prefer to "prepare to save, select something to save" rather than the other way around) and save it instead of saving whatever is preselected or the whole tab.

gildas-lormeau commented 5 months ago

The workflow you described should be possible with SingleFile today by enabling the option Annotation editor > annotate the page before saving and selecting Annotation editor > default mode > remove elements.

eugenesvk commented 5 months ago

That's different - (minor) it opens a new page, but also I don't need to remove the selected elements, I need to save them

gildas-lormeau commented 5 months ago

Would Annotation editor > default mode > remove external elements work for you instead?

eugenesvk commented 5 months ago

Thanks, this is closer, but I'll use an even better approach of fewer clicks by using the &accelerators to invoke the save selection action fully with a keyboard and then I'd only need a a single mouse click in the same tab (also the annotation seems to add a delay to preload the page before going into a selection mode, another minor downside, though it's more powerful)