Skip to content

Allow removing/noop-ing entire Keymaps #7089

Description

@LukasKnuth

Check for existing issues

  • Completed

Describe the feature

My Use-case

I'd like to fully disable all key bindings that the editor has (basically have no keyboard shortcuts at all). Then, very selectively go and set up bindings for specific actions that I actually use. The difference to how bindings work right now is that currently they're additive (overriding on conflict) where my use case is replacing the entire config (disabling any bindings that aren't mentioned in my config).

Current Options

Theoretically I could simply copy the entire "Default Key Bindings" and disable what I don't want. This has some issues:

  • It's very hard to navigate this config
  • Every update that adds new shortcuts will see them enabled by default
  • I can't simply "disable" a shortcut...

It's not really possible to deactivate an existing shortcut at the moment. #6422 seems to imply that simply mapping to null will disable the binding. This does not work for cmd-q for example (Editor still closes). The alternative mentioned in #5887 seems to be binding the key to an action that doesn't do much in the specific context. This is very situational and not explicit.

Ideas for implementation

Perhaps it would be possible to implement some of these step by step to help get us there in smaller increments? This doesn't have to be all-or-nothing!

  • Create a specific zed::NoOp action to disable existing bindings? Or have null work consistently.
  • Allow specifying that my bindings will disable all default bindings as well.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:controls/keybindsKeyboard shortcuts, mapping, binding, keymaps, etcfeatureDEPRECATED label: use issue type 'Feature' instead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions