-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Esc not working when binding #17275
Comments
You've created a global shortcut (no context) you should be able to limit it just to the {
"context": "Editor",
"bindings": {
"escape": "editor::ShowCompletions"
}
}, See Key Bindings: Context in the docs. You can look at the source for more examples for examples of the appropriate context for different shortcuts: assets/keymaps/macos/atom.json and assets/keymaps/default-macos.json |
That wasn't the full keymap.json. Attaching it here to show that it's within the editor context: [
{
"context": "Workspace",
"bindings": {
// "shift shift": "file_finder::Toggle"
}
},
{
"context": "Editor",
"bindings": {
// "j k": ["workspace::SendKeystrokes", "escape"]
"escape": "editor::ShowCompletions"
}
}
] |
Gotcha. I can reproduce with that keymap. I'm not sure what's the appropriate context for restoring this behavior (none of what I tried worked). For more see: We have multiple redundant mappings for escape, so as a workaround you could use zed/assets/keymaps/default-macos.json Lines 22 to 25 in 3256387
|
Check for existing issues
Describe the bug / provide steps to reproduce it
Coming from Textmate, binding escape to completions is a given. But.. binding this in the editor context also makes it impossible to escape/close cmd + t (Search project files..), cmd + shift + p (Execute a command), ctrl + g (Go to line) etc without using the mouse.
I would assume binding escape in the editor didn't affect "popups"/windows, only when editing.
Environment
Zed: v0.150.4 (Zed)
OS: macOS 14.5.0
Memory: 32 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: