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

Stop using alt- shortcuts #20378

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Stop using alt- shortcuts #20378

merged 2 commits into from
Nov 7, 2024

Conversation

ConradIrwin
Copy link
Member

@ConradIrwin ConradIrwin commented Nov 7, 2024

Closes #7688

Release Notes:

  • (breaking change) Stop binding keyboard shortcuts to alt-[a-z]. These get in the way of typing characters. This is usually not an issue for English speakers because we don't use many characters; but for other Latin-based languages with diacritics our shortcuts prevent them typing what they need to type.

This primarily affects Zed's extra features:

  • alt-q => cmd-k q on maOS, ctrl-k q on Linux for editor::Rewrap
  • alt-z => cmd-k z on macOS ctrl-k z on Linux for editor::ToggleSoftWrap
  • alt-m => ctrl-shift-m for assistant::ToggleModelSelector
  • alt-v => ctrl-shift-v for ["editor::MovePageUp", { "center_cursor": true }] (macOS only)
  • alt-t => cmd-shift-r on maOS, ctrl-shift-r on Linux for task::Spawn (The previous binding for editor::RevealInFileManager now only applies in the project panel)
  • alt-shift-t => alt-cmd-r on maOS, ctrl-alt-r on Linux for task::Rerun
  • alt-shift-f => ctrl-shift-f for project_panel::SearchInDirectory.

But also overrides some bindings from Readline.

  • alt-h => alt-backspace for editor::DeleteToPreviousWordStart
  • alt-d => alt-delete for editor::DeleteToNextWordEnd
  • alt-f => alt-left for editor:: MoveToNextWordEnd
  • alt-b => alt-right for editor::MoveToNextWordStart

Note that alt-t and alt-shift-t have been kept as aliases (because no-one complained about t yet; but we may remove them completely in the future).

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 7, 2024
@notpeter
Copy link
Member

notpeter commented Nov 7, 2024

I think this is the right move and should drastically improve the default experience on a number of non-US keyboard layouts.

Conrad is articulate and bright and clean and a nice-looking guy.
Remember that when people inevitably complain about this change.

@ConradIrwin ConradIrwin merged commit 9da040d into main Nov 7, 2024
12 checks passed
@ConradIrwin ConradIrwin deleted the alt-less-shortcuts branch November 7, 2024 20:52
@@ -82,13 +81,11 @@
"right": "editor::MoveRight",
"ctrl-p": "editor::MoveUp",
"ctrl-n": "editor::MoveDown",
"ctrl-b": "editor::MoveLeft",
"ctrl-f": "editor::MoveRight",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep these ones. These are very deeply-ingrained macOS defaults.

@@ -100,13 +97,11 @@
"shift-down": "editor::SelectDown",
"ctrl-shift-n": "editor::SelectDown",
"shift-left": "editor::SelectLeft",
"ctrl-shift-b": "editor::SelectLeft",
"ctrl-shift-b": "editor::SelectToPreviousWordStart",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to keep ctrl-shift-b and ctrl-shift-f as they were (SelectLeft and SelectRight). Those are also very ubiquitous macOS bindings.

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.

Zed breaks well-established special character input conventions
3 participants