zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
42.62k stars 2.27k forks source link

Keybinding UI editor #5328

Open JosephTLyons opened 2 years ago

JosephTLyons commented 2 years ago

Is your feature request related to a problem? Please describe. It isn't always super easy to work with the keymap.json. Sometimes I have no issues, other times, I'm totally lost on why something isn't working. There is an issue open for validation of config files, but I'm starting to think a keybinding user interface would be a much nicer experience.

Describe the solution you'd like A panel (maybe something that just opens up in a tab?) that has the following setup (description could be skipped):

Action Description Keybinding
Go To Line Moves Cursor to Line alt-g

The only editable area would be the Keybinding column. At a minimum, the user could just type in the keybinding, but having it capture the binding would be icing on the cake.

Some additional considerations:

iamnbutler commented 2 years ago

Have you seen any good implementations of this? Personally I find VSCode's settings ui abysmal, and dread any time I have to use it.

I feel like the closest positive experience I've had is remapping UIs in games.

endigma commented 1 year ago

I've never had any issues with VSCode's keybind editor, it's not in the normal settings area. I like the approach taken with binding keys to commands rather than commands to keys like "down" => "cursorDown" and also a million other things.

There is a UI specifically for this in VSCode, I think it works well.

image
admsmz commented 1 year ago

Hi everyone. I made a mockup of a keybinding interface that I believe would be an improvement on the status quo. Basically the idea is to use a table rather than a list. Here's a screenshot:

Screenshot 2023-02-04 at 00 09 48

Using two dimensions means you can visualise where approximately a keybinding is based on theme, if many similar keybindings are grouped close together. At least, that's how my mind works. Ymmv.

JosephTLyons commented 1 month ago

Im wondering if we can ship something smaller in the interim - just a modal that displays the keys being held, allowing for copying and pasting into the clipboard so you can paste it into your keymap.json file.