gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom keyboard Accelerator abbreviations for all menu items

eugenesvk opened this issue · comments

Is your feature request related to a problem? Please describe.
Currently it's a bit inefficient to pick a specific profile/option from the context menu since you have to look at it and select via a mouse

Describe the solution you'd like
Allow custom accelerators so you could open and execute a profile via a sequence of , for example, CtrlA,G1 (activate extension, open a Group, select 1Profile just like you can right-click the extension button and press O to open options)

Currently the first shortcut doesn't open the extension menu, but launches a page saving operation instead, but that's another feature request #1419

Describe alternatives you've considered (optional)
Using cursor keys :)

Additional context (optional)
N/a

As discussed in entry #1419, there is no technical way of associating a menu entry with a shortcut. However, I need to see if it would be possible to associate one (or more) for each profile.

Well, the mouse (and extension button) context menu subitems can have accelerators, just checked by editing

	"menuSaveWithProfile": {
		"message": "&U Save page with profile",
		"description": "Menu entry: 'Save with profile'"
	},

And this works

That's already progress as that makes the selection within the menu easier

But then

  • is this user-configurable or only editable via the messages.json
  • is there a way to add an accelerator to the extension item itself? So that (at least to the page context menu) it's &SingleFile
    • I've found that editing the name in the manifest.json works!!! Which is great, I'll do that locally, and since you can use external tool to open this context menu via a shortcut I can achieve the full chording experience!!!
  • again, is the ↑ user configurable or only editable via the manifest?

(and I can add &profile_name to even have accelerators working with dynamic profile selection menu!)

Thank you very much for the info, I was not aware of this feature. I'll do some tests and keep you updated.

I guess I'm missing something here, I tested your messages.json file. However, this does not seem to work as expected. On my machine (macOS/Apple Silicon), if I type for example & and d when the first item is selected in the SingleFile menu then it does not select the "Save selection" entry. I did the test in Firefox and Chrome.

Yeah, macOS doesn't support the & convention by default (though interestingly enough, the & sign isn't shown, so there is some awareness? ).

I don't know how whether there is a workaround/alternative for this (and don't understand why browsers don't support this)