zed
zed copied to clipboard
Alt/option key related shortcuts not working in mac m1
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
My device
Mac m1 8gb 256gb
Description
i tried adding custom keybindings base on alt/option key but they are not working.
Example of keybindings i tried:
{ "context": "Editor && vim_mode == normal", "bindings": { "alt-h": "editor::MoveToPreviousWordStart", "alt-l": "editor::MoveToNextWordEnd", } }
- the keybindings imported from vscode which contains option/alt key works fine.
Environment
Mac m1 8gb 256gb
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your ~/Library/Logs/Zed/Zed.log
file to this issue.
No response
Hey @auspy,
I've just tried reproducing your problem on my Mac, and I cannot. For me, everything works as expected. Here is my configuration:
[
{
"context": "Editor && vim_mode == normal",
"bindings": {
"alt-h": "editor::MoveToPreviousWordStart",
"alt-l": "editor::MoveToNextWordEnd"
}
}
]
I tried on macOS Sonoma 14.4.1 and Zed 0.131.6. Could you give me any reproduction steps?
Hey @auspy,
I've just tried reproducing your problem on my Mac, and I cannot. For me, everything works as expected. Here is my configuration:
[ { "context": "Editor && vim_mode == normal", "bindings": { "alt-h": "editor::MoveToPreviousWordStart", "alt-l": "editor::MoveToNextWordEnd" } } ]
I tried on macOS Sonoma 14.4.1 and Zed 0.131.6. Could you give me any reproduction steps?
i am using macOS Sonoma 14.1.1 and zed 0.131.6. I tested the snippet you sent and it's not working
Interesting, maybe macOS captures these shortcuts? I will try to reproduce this on a different MBP.
I am not able to reproduce this either, adding these keybinds worked as expected.
Your original snippet was not valid JSON (extra comma). In the Zed version when this issue was filed, invalid json would (silently) prevent a keymap from being applied. We've subsequently improved validation support to settings/keymaps which will automatically fix small issue (excess commas) and throw an error with an invalid configuration.
If you are still experiencing this issue, please feel free to comment and I'm happy to reopen.