zed icon indicating copy to clipboard operation
zed copied to clipboard

Alt/option key related shortcuts not working in mac m1

Open auspy opened this issue 10 months ago • 3 comments

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

auspy avatar Apr 06 '24 14:04 auspy

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?

jborkowski avatar Apr 21 '24 17:04 jborkowski

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

auspy avatar Apr 22 '24 09:04 auspy

Interesting, maybe macOS captures these shortcuts? I will try to reproduce this on a different MBP.

jborkowski avatar Apr 22 '24 09:04 jborkowski

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.

notpeter avatar Aug 27 '24 14:08 notpeter