-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
Allow extension commands to define the behaviour when Alt modifier is pressed #18064
Comments
You cannot achieve that with a single command. A command will always have a single behavior and no alternate behavior. You always have to define different commands for different behaviors and can bind different key bindings to them. |
Hi @sandy081 , I guess I messed up with the issue description 😢 . The intention was not for My Project Manager extension has two commands: The original idea of this issue was to be able to select items (and detect the modifier) with Sorry for the misunderstanding. |
If I understand correctly, your requirement was to know how a user selected an entry in quick pick say
|
Yes, exactly 👍 I have looked at VSCode source code sometime ago, and found where this was handled. If I remember correctly, only the Thanks in advance |
Looks like the new |
Although I agree that this is a valid request, I wonder if instead you'd prefer to use the new Sometimes I accidentally trigger the |
In fact, I would like to have both 😬, but yes, the new The reason to prefer the modifier approach is because users complains about the extension not following VS Code behavior. Not only my Project Manager extension would use, but also both Bookmarks extensions. But I understand your point. The issue is quite old and has only a few upvotes/interactions. If you don't see this happening in the near future, nor other devs/teams requesting such API, feel free to close the issue in favor of the Thank you |
I agree this would be useful. I would enjoy being able to tell if e.g. Alt or Ctrl is pressed when for instance an action button atop the editor area that I contribute is pressed, and act then accordingly. |
When you declare a
command
for an extension, it appears inCommand Palette
and you can select/use it withReturn Key
/Mouse Click
. But there are some core commands that has special behavior when you combine withCtrl
, likeOpen on the Side
.I would like to have the ability to declare a command and have the normal and alternative behaviors, just like that.
Thanks in advance
The text was updated successfully, but these errors were encountered: