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

Add keyboard shortcuts for the prompts on Linux #13915

Merged

Conversation

hron
Copy link
Contributor

@hron hron commented Jul 7, 2024

This change adds ability to choose any action from prompts, not just the default one and cancel as Zed has right now. For example, when a user tries to close a file with edits in it the prompt offers "Don't save" option that can be selected only with mouse. Now you can use arrows, tab/shift-tab to pick action and enter/space to confirm it.

Fixes #13906

Release Notes:

  • Added keyboard navigation in the prompts on Linux (#13906).
Screencast.from.2024-07-07.18-02-05.webm

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jul 7, 2024
@hron hron force-pushed the keyboard-shortcuts-for-prompts-on-linux branch from 0571f9d to 4d98adf Compare July 7, 2024 14:59
This change adds ability to choose any action from prompts, not just the
default one and cancellation as Zed has right now.

For example, when a user tries to close a file with some changes the
prompt offers "Don't save" option that can be selected only with mouse.
Now you can use arrows, tab/shift-tab to pick action and enter/space to
confirm it.

Fixes [zed-industries#13906](zed-industries#13906)
@hron hron force-pushed the keyboard-shortcuts-for-prompts-on-linux branch from 4d98adf to ace6159 Compare July 7, 2024 17:19
@mrnugget
Copy link
Member

mrnugget commented Jul 9, 2024

I changed it so that tab goes from left to right instead of from right to left, which it did here due to the call to .rev() down there. I think left to right for next is much more intuitive.

Will merge once CI runs through.

Thank you!

@mrnugget mrnugget merged commit 18d6be2 into zed-industries:main Jul 9, 2024
9 checks passed
mrnugget added a commit that referenced this pull request Jul 9, 2024
This change adds ability to choose any action from prompts, not just the
default one and cancel as Zed has right now. For example, when a user
tries to close a file with edits in it the prompt offers "Don't save"
option that can be selected only with mouse. Now you can use arrows,
tab/shift-tab to pick action and enter/space to confirm it.

Fixes [#13906](#13906)


Release Notes:

- Added keyboard navigation in the prompts on Linux
([#13906](#13906)).


Co-authored-by: Thorsten Ball <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Linux] TAB circulation across different selection buttons (Cancel/OK/Save, etc.)
3 participants