devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Registrable commands for plugins

Open yannbf opened this issue 1 year ago • 1 comments

Clear and concise description of the problem

The dev tools floating button is amazing, and I feel like it would benefit from having shortcuts for toggling it on and off. Additionally, as a plugin developer, I'd like a way to define custom commands and assign shortcuts to them, similar to how VSCode does. Maybe in the future, if it made sense, such commands could be available as part of a general command palette as well, similar to how it's shown in VSCode.

Suggested solution

I'd like to be able to register custom commands which will be triggered based on keyboard shortcuts, which would allow me to do any custom action, for instance enable/disable component highlighting feature.

For the dock itself, I can imagine commands like:

  • Hide/show
  • Open/close
  • Pop out/in
  • Toggle transparency

Alternative

No response

Additional context

No response

Validations

  • [x] Follow our Code of Conduct
  • [x] Read the Contributing Guide.
  • [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

yannbf avatar Nov 13 '25 09:11 yannbf

Implemented in #247

antfu avatar Mar 24 '26 02:03 antfu