Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple commands for events in trees #51536

Closed
nickdodd79 opened this issue Jun 10, 2018 · 1 comment
Closed

Multiple commands for events in trees #51536

nickdodd79 opened this issue Jun 10, 2018 · 1 comment
Assignees

Comments

@nickdodd79
Copy link

Not sure if I have missed something in the documentation, but I need to handle multiple events on items in a tree (click, double click and enter). I have an extension that displays and runs gulp tasks within a workspace.

At the moment, I have a command that tracks the selection of an item, which in turn controls relevant nav icons depending on the item's state (e.g. if idle an execute icon is shown, if executing a terminate icon is shown).

I am hoping to add a feature where users a can double click or press enter to execute a task, but still allow selection to be activated with a single click. This would require multiple commands to be registered for a tree item.

Can a change be made so TreeItem instances can have event driven commands. Something like:

clickCommand
keypressCommand
doubleClickCommand

Which will also provide the triggered event object. In the example of keypress, providing the event will allow the key that activated the event to be resolved.

@jrieken jrieken assigned sandy081 and unassigned jrieken Jun 11, 2018
@sandy081
Copy link
Member

There are plans to support double click command but not keypress. See #39601

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants