Treestyletab: Support for Keyboard Shortcuts

Created on 2 Jan 2018  路  4Comments  路  Source: piroor/treestyletab

In the past we could use Dorando Keyconfig addon to add keyboard shortcuts with Tree Style Tab API scripts from the wiki, for opening and moving tabs etc.

There is a new Web Extension "Shortkeys" but so far it's not possible to use it with the new Tree Style Tab API.

I opened an issue about it: https://github.com/mikecrittenden/shortkeys/issues/109#issuecomment-351186931 and I said I would post a link to it here. I would like to know if anyone has any ideas about how this can be made to work.

I understand that it should be possible for Shortkeys to include actions that are specific to Tree Style Tab. Unfortunately, the developer doesn't have time for this, but he will accept contributions.

Ideally the user could put in custom scripts based on the API, just like in the past. However, it seems that this might not be possible, see https://github.com/mikecrittenden/shortkeys/issues/76?

If anyone could help to add support for keyboard shortcuts, it would be appreciated, thank-you.

bug of Firefox itself help wanted

Most helpful comment

Thank you for links to related bugs. I've updated the FAQ.

And I've added new more APIs:

However he addon Shortkeys seems to be impossible to call those APIs via its "Run JavaScript" option. I think the addon need to be updated to communicate with other addons like TST via messaging API.

All 4 comments

This is a FAQ:
https://github.com/piroor/treestyletab/blob/master/README.md#keyboard-shortcuts-for-tsts-custom-functions-for-example-toggle-showhide-of-the-sidebar-operations-to-modify-tree-and-so-on

@piroor, thanks for your answer. I did read the FAQ, but the Firefox bugs listed there are all 1-2 years old, and still "unassigned".

The extension "Shortkeys" uses event listeners in page content scripts, instead of manifest-defined keys, so doesn't require any new API or work from Mozilla and it could be made to work today. There are disadvantages such as the commands don't work on special pages like "about:newtab" and so on. But it's better than nothing.

It would require a contribution to the Shortkeys code to add the ability for it to talk to Tree Style Tab through its API, and also to either add pre-defined Tree Style Tab API commands, or to solve the problem of allowing the user to add their own custom ones. Unfortunately, neither the Shortkeys developer nor I am able to do that work on Shortkeys at the moment, so I hoped maybe another Tree Style Tab user could help. I don't expect that you have time to do it yourself.

On the other hand, I just found Firefox bug 1421811 "Provide a way for an extension to update the shortcut for its command", which has been assigned and is right now being worked on. In this case, would you try to provide pre-defined commands, that can have their shortcuts changed, in TST? Or would you wait for bug 1303384 "UI for re-assigning command shortcuts" (this will be worked on after bug 1421811 is complete) to provide the interface for it? Or maybe wait for bug 1348589 "Support dynamic commands", so that users can define their own custom commands using API scripts? Or maybe you won't do any of this, and just wait for someone else to make another extension to control TST?

Would it be helpful for you, for example if people say what commands they want, or try to add "code snippets" to the API page in the Wiki? If so, is there a way we can already start developing and testing such snippets?

For example, the most important commands for me would be:

  • indent/outdent tab
  • move tab up/down
  • focus next/prevous tab
  • create or duplicate tabs with different relationships, i.e., child, sibling, independent

Thank you for links to related bugs. I've updated the FAQ.

And I've added new more APIs:

However he addon Shortkeys seems to be impossible to call those APIs via its "Run JavaScript" option. I think the addon need to be updated to communicate with other addons like TST via messaging API.

I close this because outdated.

Was this page helpful?
0 / 5 - 0 ratings