Closed joadoumie closed 5 days ago
@zadjii-msft I think what would be really cool is if the keyboard modifier logic is baked into Command interface, that way when we can have a bunch of Helper commands that when a developer leverages them in their extensions the keyboard modifiers are the same. This may be exactly what you had in mind already to be fair.
Eh, I'm not so sure about putting them on Command
itself. What happens if a developer puts a shortcut on a Command
which is the default action of a TopLevelCommand? Does that make the shortcut work from the L0? (I don't think it should) What if multiple extensions all specify the same shortcut on their L0 commands?
Though it does look like I deleted this from the "final" version of the spec before I left on leave. I think I mentally bookmarked this as a post-MLP feature.
I'll put this on me to spec out, then a second issue to actually implement it.
Totally make sense to have the keyboard binding be to the contextitem imo too.
As much as possible it's really nice if commands that may be reused around all the different surfaces / extensions were to have the same keyboard modifiers... maybe it's as simple as having handy ContextItems that people can reuse through different surfaces that just wrap specific commands that folks also use.
Commands should have a notion of keyboard modifiers as exists in PT Run today:
This is how existing PT Plugins can input keyboard modifiers / accelerators.
Commands should have specific keyboard modifiers associated with the command.