-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Breaking Keybinding Changes 2024-11-13 #20425
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Hi, spanish keyboard on Mac Mini M1 here. My lovely Zed just broke the keybindings after the last update (v0.162.3). Unfortunately now a cmd-f (buffer search) opens a new buffer panel to the right. (edit for extra details) Example, this will open the help menu item, despite my keymap config.
Similar problems with project search, and split right binding to cmd-f instead of search (this last one was fixable by editing my my |
This comment was marked as resolved.
This comment was marked as resolved.
@cristianorvf Sorry about this! Those bindings should be spelled |
This comment was marked as resolved.
This comment was marked as resolved.
Most things seems solved after the last update, with one exception: comments shortcut keep opening the "Help" menu item in spanish keyboards. So, comments are BTW: Is this the right place for posting this? |
@minimo-io can you confirm which layout you're on (look in |
Sure @ConradIrwin I am using a spanish magic keyboard (apple), more details in the first screen-cap. |
@minimo-io wierd... that is acting pretty much how I expect, except that the help menu opens for you. I notice in my settings that I have this keybinding available, but disabled. (And even if I enable it, I don't get the problem you see) Do you have anything similar? |
Weird indeed! I checked and had that OS option enabled, after disabling it and trying to comment again, the help menu does not open anymore but still cannot comment lines (nothing happens). To keep things usable i changed the key-binding to Let me know if I can help in any other way. I am using a Mac Mini M1 (2020), OS version 15.1.1 (Sequoia), system language is English, keyboard in Spanish, details above. Thanks! |
I stumbled upon this myself just now, after a lengthy phase of avoiding the sequoia update, and thanks to @ConradIrwin's comment I quickly found the reason why now suddenly the help-menu pops up. Now the weird part: I'm using the default keybindings in zed, german keyboard, which is similar to spanish with regard to |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I am using a german keyboard layout, and I noticed that it works if I press the key next to it (
If I add a custom keybinding for it it works again with
|
I'd like to avoid this thread from getting too large so I'm going to hide some replies above and roll them into individual issues or notes in this comment. Associated issues:
|
Yeah, this is a standard macOS shortcut. I haven't tested how it interacts with Zed's new keybinding, but I imagine it could result in some funny behaviour. |
I've been trying to get back to the "breaking change" but seems I can't. There was a time when I was in happy land with CMD-´ working just as it does on a US keyboard with me using a Swedish one. This was fantastic. It seems now that it has been reverted and is no longer possible to achieve? |
Same here. I just ended up changing my keymap for the moment (Spanish keyboard, macOS, US system language) |
Thanks for the post, this is a workaround for the moment! I admit the change confuses me. As far as my tests go, the update makes Zed behave different from all other text editors on macOS I have installed (German ISO QWERTZ keyboard in my case). Before the update, this important binding worked perfectly well.
My question: Would it be possible to opt out of the key equivalents for the default keymap as well, not only for custom keybindings? For comparison, inspecting VSCode’s key mappings shows me that every command that contains PS: The docs state both |
@jannisborgers The Where to go from here though...? While the shipped solution works as I intended, it isn't making anyone happy. We could support I know this would be another breaking change for people, which doesn't make me thrilled, but I would like to end up at a point where it works as well as possible by default. What if we changed the key equivalents to prioritize keeping more shortcuts unchanged?
Does that sound like a reasonable change? Would anyone like to take a pass at other layouts? The other wrinkle that I am not sure how to solve is the window switching shortcuts ( |
Personally I would love if Zed led the way and used macOS native bindings as it did for a short while. It's one of my longest standing problems with any editor that CMD-backtick doesn't comment lines and when it started doing that in Zed it was amazing (well, Zed just allowing macOS to do its thing really). Having another custom solution seems even more confusing to be honest. |
@ConradIrwin Thanks for acknowledging the issues, I’m sorry that my comment was a little strong. More thought went into this than I realized and my problem can be solved by setting up a keybinding, while the update might help those that need the other keybindings that didn’t work without the remapping. The major point for me is the way I had to set up the shortcut. Using a character printed on the I know this might be beyond the scope, but could a GUI ease solving the problems? Other editors let you record the desired shortcut by pressing a button, which seems to be the most direct way to make sure the right keys need to be pressed. This would probably not solve the problem where default shortcuts don’t work with all keyboard layouts. For comparison: VSCode has a GUI for shortcuts, but also uses key mappings (use "Developer: Inspect Key Mappings" command to see), so I guess this needs to be done either way. |
@hedefalk which version of Zed are you using? in 0.165 and below you'll want to add @jannisborgers no worries, thank you for being able to have a constructive disagreement online (it's a rare skill :D). I hope the change to 0.166 to fix the way keymaps work for you resolves that problem. |
@ConradIrwin Thanks, yes, I'm on 0.165.4 so now good with:
|
It looks that some recent changes here changed the globe/fn-F binding to full screen on the Mac. The command palette now shows this bound to ctrl-cmd-F. While both of these keys seem to work with some mac apps, globe/fn-F seems to be the "mac standard" binding which appears in the menu for most mac apps (safari, mail, etc) I don't know if globe/fn-F broke during these changes inadvertently or if it was intentionally rebound, but as of 0.166.1 (and likely before), globe-f no longer matches the menu shortcut. This key DID work after some of the above changes, as recently as a week ago. |
I tested If I have multiple macOS workspaces, it switches to the next workspace instead. Does this keybinding just get eaten by macOS? |
Update: Accepting partial inline completion finally works in 0.170.1 (and was changed to ctrlcmd→ on macOS). |
We are making multiple changes to how keyboards work in Zed.
The first two affect all platforms, the remaining three affect only macOS.
For the thinking behind this, please see Zed Blog: macOS Keyboard Shortcut Localization.
1. Removal of alt- only key bindings.
As of Zed v0.162.x (released as Zed Preview on 2024-11-13 and Zed Stable on 2024-11-20) Zed will be removing a number of keyboard shortcuts which of the form
alt-N
/option-N
where N is a single letter.The purpose of this change is to better accommodate users of non-US keyboards in the default Zed configuration. On these keyboards, these default shortcuts prevented the use of non-ASCII characters required for these languages.
If you wish to continue using these, you will need to explicitly add them to your User keymap (
~/.config/zed/keymap.json
) which is accessible via thezed: open keymap
action from the command palette or by pressingcmd-k cmd-s
(Mac) orctrl-k ctrl-s
(Linux/Win).We appreciate your understanding an apologize for any disruption this may cause.
2. Inline Completion (Copilot, SuperMaven) Partial Completion Acceptance
On MacOS, the default keyboard shortcut bound to
editor::AcceptPartialInlineCompletion
will now be
ctrl-right
instead ofcmd-right
.On Linux, the default keyboard shortcut bound to
editor::AcceptPartialInlineCompletion
will now be
alt-right
instead ofctrl-right
.editor::AcceptPartialInlineCompletion
action #204193. Updated shortcuts for extended Latin keyboards
On macOS when using a keyboard that supports an extended Latin character set (e.g. French, German, ...) keyboard shortcuts are now automatically updated so that they can be typed without option. This fixes several long-standing problems where some keyboards could not type some shortcuts.
This mapping works the same way as macOS. For example on a German keyboard shortcuts like
cmd->
becomecmd-:
,cmd-[
andcmd-]
becomecmd-ö
andcmd-ä
. This mapping happens at the time keyboard layout files are read so the new keybindings are visible in the command palette by searching for an action. To opt out of this behavior for your custom keyboard shortcuts, set "use_layout_keys": true in your binding section. For the keys affected on each layout see here.This does not affect Vim mode, as Vim's shortcuts use layout keys to make them more compatible with Vim.
4. Updated shortcut handling for non-Latin keyboards
On macOS when using a keyboard that types a non-Latin character set (e.g. Armenian, Cyrillic), bindings bound to latin characters are more reliable. Zed will now always try to use the character from your keyboard's command layout (which is usually QWERTY) when matching bindings, instead of only doing this when the
command
key is held down.This allows you to use Vim's normal mode without switching keyboard, and makes bindings like
ctrl-a
for select all accessible.5. Dispatching shortcuts before IME
Keyboard shortcuts will now be dispatched before trigging the IME system. This primarily affects vim mode on keyboards with IME menus (like Japanese), where you'll now be able to use vim normal mode without switching input.
It also changes the behavior on Extended Latin keyboards with dead keys. For example ^ will go to the beginning of a line in vim mode, even if it would normally be a dead key. This is a departure from vim, where you would have to type
^ space
. Note that some mappings still require the space. For example:d f ^ space
is needed because you might want to dod f â
instead.The text was updated successfully, but these errors were encountered: