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

linux: Forward ctrl-w/ctrl-e to terminal #13263

Merged
merged 1 commit into from
Jun 19, 2024
Merged

linux: Forward ctrl-w/ctrl-e to terminal #13263

merged 1 commit into from
Jun 19, 2024

Conversation

mrnugget
Copy link
Member

This fixes ctrl-w and ctrl-e not working in the terminal pane but instead triggering Zed actions ("close pane" and "search project files" respectively).

I've added both because I think they're pretty commonly used in terminals, since they're default Emacs-style keybindings.

But I also didn't want to add more, since it's relatively easy for users to define themselves which keybindings should be forwarded to the terminal and which not.

All that's required is adding something like this to the keymap:

{
  "context": "Terminal",
  "bindings": {
    "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"],
    "ctrl-p": ["terminal::SendKeystroke", "ctrl-p"]
  }
}

cc @mikayla-maki

Release Notes:

  • N/A

This fixes `ctrl-w` and `ctrl-e` not working in the terminal pane but
instead triggering Zed actions ("close pane" and "search project
files" respectively).

I've added both because I think they're pretty commonly used in
terminals, since they're default Emacs-style keybindings.

But I also didn't want to add more, since it's relatively easy for users
to define themselves which keybindings should be forwarded to the
terminal and which not.

All that's required is adding something like this to the keymap:

```json
{
  "context": "Terminal",
  "bindings": {
    "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"],
    "ctrl-p": ["terminal::SendKeystroke", "ctrl-p"]
  }
}
```
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jun 19, 2024
@mrnugget mrnugget merged commit aff7a83 into main Jun 19, 2024
9 checks passed
@mrnugget mrnugget deleted the linux-terminal-ctrl branch June 19, 2024 13:14
mrnugget added a commit that referenced this pull request Jun 20, 2024
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.

1 participant