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

Keyboard shortcuts for specific code actions #157719

Closed
justschen opened this issue Aug 9, 2022 · 6 comments
Closed

Keyboard shortcuts for specific code actions #157719

justschen opened this issue Aug 9, 2022 · 6 comments
Assignees
Labels
editor-code-actions Editor inplace actions (Ctrl + .) feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Milestone

Comments

@justschen
Copy link
Contributor

Some feedback from trying out useCustomCodeActionMenu: it's no longer possible to select a list item using the keyboard. For example, with the old version I was able to select "Unwrap function call" simply by typing u:

image

Originally posted by @OliverJAsh in #152913 (comment)

@justschen justschen self-assigned this Aug 9, 2022
@justschen
Copy link
Contributor Author

justschen commented Aug 9, 2022

At the moment, even the old context menu used to show the code action menu didn't support keybindings like this. Seems like this was something that was specific to the native macOS menu, but can also be implemented now in vs code with the custom keybindings

@mjbvz mjbvz added the editor-code-actions Editor inplace actions (Ctrl + .) label Aug 9, 2022
@zardoy
Copy link
Contributor

zardoy commented Aug 12, 2022

If it will be implemented in the same way as workbench list tree works now, please ensure that typing second key won't reset the sequence. For example typing s and then u shouldn't select Unwrap function call, but Surround With.... Because I've seen in some other places such as menu selecting output channel on Windows it listens for first typed character only.

But I think it'd be ideal to use some kind of old widget from explorer area to highlight/filter actions gracefully.

@jibbers42
Copy link

I'd like to see this implemented as a filter where typing "widj" below would leave you with "Extract Widget" and "Wrap with widget...". This would make it easy to arrow to the desired item when there is more than one matching the filter.

image

@alber70g
Copy link

alber70g commented Mar 10, 2023

Will this be fixed? My right-hand cries when I have to do a "quick" fix... So much for it being quick

A solution that allows us to fuzzy search to filter and then CMD+<number> would be nice. The shortcut for the first 1-0 can be shown like the screenshot of the OP comment

Similar applies to the omnibar that can be accessed by CMD+(shift)P. Tab doesn't move the selector down, which forces the user to use mouse or arrow keys.

@justschen justschen self-assigned this Aug 9, 2023
@justschen
Copy link
Contributor Author

Revisiting this - may play around with something like this :
Group 3

@justschen
Copy link
Contributor Author

First iteration of this feature is now insiders-released. Continuing to fix and optimize as mentioned in #190447

@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-code-actions Editor inplace actions (Ctrl + .) feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Projects
None yet
Development

No branches or pull requests

6 participants