Keyboard shortcuts changes #17031
Replies: 19 comments 39 replies
-
I am using Colemak on Mac/Linux/Windows and have always pressed the same letter on the colemak layout, not matter where the physical keys are located. For example, in browsers, creating a new tab usually is Ctrl-T. I also type Ctrl-(T in Colemak). (though qwerty users will see me type Ctrl-(F in qwerty)) Same is vim. When I work in the Terminal, programs like vim is oblivious of my keyboard layout. The letter it has received is the only thing mattered. I think it's in our best interest to remain this way as muscle memory is very hard to change. |
Beta Was this translation helpful? Give feedback.
-
How long is the feedback window? I'm indisposed for the rest of the week at least, but I should be ready to think about this in earnest and test things out on my laptop next week or the week after at the latest. For future reference, I'm running Gentoo Linux with KDE Plasma 6 Wayland, using Fcitx for keyboard input. The weird thing about Fcitx and Plasma is that Fcitx, at least on Plasma, acts as some sort of virtual keyboard, whereas Plasma itself (as far as I can tell) uses XKB for its native keyboard handling. This means that, most of the time at least — it's weird and I've done very limited testing — what keyboard shortcuts are registered by Zed at present are solely determined by Plasma's built-in keyboard layout settings, not whatever Fcitx does. |
Beta Was this translation helpful? Give feedback.
-
In my opinion, you're definitely going to want an option to toggle shortcuts between:
and
I use the colmak-dh layout to reduce hand movement. And as most split keyboard programmers do, I also added the brackets along the middle. i.e. |
Beta Was this translation helpful? Give feedback.
-
I use a MacBook with Japanese keyboard. Primary editor was Emacs before using Zed. I never encountered a key binding that I couldn't enter. I don't feel much inconvenience. But some apps like Kitty have key bindings that I can't enter. For example, If Zed uses these kind of key bindings, then it may become inconvenient. |
Beta Was this translation helpful? Give feedback.
-
I use a Ferris Sweep with colemak (on macOS) and if I'm understanding this correctly nothing would change since the keybinds are still using the same virtual keys, so I would continue pressing Since the keyboard reports whatever character is pressed and that is opaque to zed? |
Beta Was this translation helpful? Give feedback.
-
I've recently migrated to colemak, but my 10 years of muscle memory using vim guides my fingers to the qwerty key locations, so I remapped every key to their qwerty counterparts. Especially, hjkl is simply not usable in default colemak layout. So I would strongly prefer the full virtual key option for vim mappings as well. |
Beta Was this translation helpful? Give feedback.
-
I do think this should be a toggleable option at most, because otherwise in order to restore the previous behaviour, people will have to remap every key on their keyboard! |
Beta Was this translation helpful? Give feedback.
-
One thing missing from the discussion so far is people using non-English layouts. Is anyone using Azerty/Czech etc. who has opinions? |
Beta Was this translation helpful? Give feedback.
-
Romania, EU here. |
Beta Was this translation helpful? Give feedback.
-
I use German QWERTZ Layout both on Mac and Linux. |
Beta Was this translation helpful? Give feedback.
-
I use Colemak-DH on macOS. Doesn't this affect qwerty too? On my Norwegian ISO keyboard you press Shift+8 to write |
Beta Was this translation helpful? Give feedback.
-
I use the Optimot layout (small French community layout) on macOS. Every Apple built-in app seems to respond to Virtual keys. Like, VSCode works perfetly, Obsidain as well, that's perfect. But PHPStorm / WebStorm don't play nice. I need to trick the shortcuts mapping to do what I want. And Zed is in a strange zone, making it almost unusable (copy/paste not working, etc.) The real tricky part is that there are some variants of Optimot which change some letters placement when I attach a screenshot of my very own to show you. |
Beta Was this translation helpful? Give feedback.
-
I'm typing on a Taiwanese Zhuyin keyboard, pressing the |
Beta Was this translation helpful? Give feedback.
-
I'm using a French Keyboard on mac, (see #17057 for details) and can't do
It would seem logical that we have the same behavior in the Zed Terminal and the Zed Editor... (like any other app'...) |
Beta Was this translation helpful? Give feedback.
-
The technical aspects escape me a little I admit... But the option_as_meta setting seems to work in any (of my) case!!! {
"terminal": {
"option_as_meta": false
}
} Thanks ;-) |
Beta Was this translation helpful? Give feedback.
-
Being unable to use the QWERTY shortcuts in Bulgarian layout is below my usability threshold. It's a behavior I haven't encountered in any other app. I have to switch to US just to copy/paste/save and then switch back to continue my work. |
Beta Was this translation helpful? Give feedback.
-
Thanks for all the input here! I now am confident about what we should do for macOS, and think that it will generalize to Linux. The goals again are:
There are three kinds of keyboard layout to consider:
If you have a keyboard in group 1, then nothing will change. If you see If you have a keyboard in group 2, then you will gain the ability to type Zed shortcuts using the QWERTY equivalent key positions (this does not work today). As far as I can tell, macOS prints a qwerty layout on these keyboards, and so we will continue to render If you have a keyboard in group 3, more work is needed. We will solve this by configuring a remapping for each layout that moves the shortcuts around. For example on a QWERTZ keyboard if Zed will ship with builtin mappings for the macOS builtin remappings so that shortcuts remain the same between apps, and we'll let you configure the map in your settings. On Linux we'll do the same as macOS, though I'm less sure if we can provide the default mappings. On Windows, the operating system already provides the mapping layer for us, and so we will use the windows virtual key code system (in common with other apps). And then...There are three other pieces to the puzzle I'd like to support:
In both cases we need to know "what character does the key actually correspond to". In most cases this is unambiguous (we don't have anything bound to For the cases where there are conflicts (this happens today with shortcuts that only require Please let me know if there's anything there which you think is not going to work for you! |
Beta Was this translation helpful? Give feedback.
-
I like this idea. Yes, we have two separate meta keys so why not utilize them for different things? |
Beta Was this translation helpful? Give feedback.
-
Did something change here recently? All of a sudden my keyboard shortcuts weren't working anymore, or got bind to new actions. For example I had/have Looking at the default key bindings I see this
And sure enough, My custom
But that doesn't work anymore. |
Beta Was this translation helpful? Give feedback.
-
Hi All!
We (@ConradIrwin, @haruleekim and @JunkuiZhang) are thinking about making some (comparatively) big changes to how key bindings are matched in Zed.
(Update 2024-09-03): We are considering between two options for macOS/Linux:
In either case we will also update our display of shortcuts to match what you have to type them on your current layout, and we will likely stick with "the windows option" on Windows. Also, in either case we will likely also allow extensions to provide keybindings so that active language communities can make the keyboard shortcuts easier to use.
Each approach has a downside, and I'd like to figure out which is the less bad downside.
cmd-option-5
is ambiguous. Did you meancmd-option-5
orcmd-[
. VScode disambiguates this by using ctrl, we could copy that, or we could use left-option vs right-option to disambiguate (like iTerm).I'd like input on which option feels more correct to you coming from other macOS/Linux apps using a non-English Latin-based keyboard.
In either case:
ctrl-a
would be accessible with the same key thatcmd-a
is.previous post:
Today Zed uses a character-based matching system. When the binding says
cmd-{
you have to type the "{" key (wherever it is on your keyboard) while holding command down. We also disable keyboard shortcuts while IME is in progress.We are considering changing this so that we use a virtual key code based matching system. When the binding says
cmd-{
you will have to type "command", "shift" and the virtual key for[/{
which will depend on your layout. We are also considering enabling shortcuts during IME.This should have no impact on users of qwerty keyboards, but for people using non-qwerty keyboards this will change the location of shortcuts.
We intend to use virtual key codes, so that (for example) if you use a Dvorak keyboard
cmd-o
will be accessed with the key to the right ofa
(labelledo
in Dvorak, buts
in qwerty). This is the same as how Dvorak is handled today.Questions I'd love answers to:
The problems we expect this to solve are:
cmd-{
on Czech).This may cause some confusion:
Beta Was this translation helpful? Give feedback.
All reactions