Open auspy opened 6 months ago
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.
Was any solution found for this? I am also not able to get these 'alt' specific key binds to work.
Here is my keymaps file
{
"context": "Editor && vim_mode==normal",
"bindings": {
"alt-h": ["workspace::ActivatePaneInDirection", "Left"], // All of these don't work
"alt-j": ["workspace::ActivatePaneInDirection", "Down"],
"alt-k": ["workspace::ActivatePaneInDirection", "Up"],
"alt-l": ["workspace::ActivatePaneInDirection", "Right"]
}
},
{
"context": "Editor && vim_mode==normal && vim_operator == none && !VimWaiting",
"bindings": {
//... some other non-clashing keybinds
"space m h": ["workspace::ActivatePaneInDirection", "Left"] // This works
}
My Mac version: Sequoia 15.0 Zed version: 0.153.6
This may be a Sequoia specific issue. @auspy are you also running Sequoia?
This may be a Sequoia specific issue.
@notpeter I think it is not that, cuz I was using zed for a few days before upgrading to Sequoia.
I reckon it's related to alt
key being auto-mapped to option
key in the mac native keyboard and there are these annoying keystrokes with option
key that get triggered when these combinations are pressed. I have also noticed a ?
appearing at the cursor location when I put the key combo.
I am sorry, but I am fairly new to all of this (mac, vim, and zed) and when I researched a bit about this ?
appearing I found all these details. Is it possible that you have disabled those special characters and so you're zed is able to capture the option
keystroke? If yes, can you please share some resource to do that? I tried stackoverflow's answer but it was very complicated for me to follow. Thanks for your help! :)
Edit These are the special symbols I was talking about: -
etc...
Check for existing issues
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:
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