# Restore the ability to disable key bindings by setting them to \`null\` in your keymap \(\#3921\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7e810d7e0d1e9672696e4ad52d1211603ee7f8bf)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7e810d7e0d1e9672696e4ad52d1211603ee7f8bf

Requested commit: 7e810d7e0d1e9672696e4ad52d1211603ee7f8bf

Commit: 7e810d7e0d1e9672696e4ad52d1211603ee7f8bf

Tree: c732966b02fb0b428c6eb6a510f821865a718765

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Restore the ability to disable key bindings by setting them to `null` in your keymap (#3921)

* Fix an incorrect use of `Any::type_id` that prevented the disabling of
key bindings
* Restructured the representation of disabled key bindings so that they
handle context predicates correctly. Previously, to disable key binding,
you needed to supply the exact same context predicate (e.g. `Editor &&
mode == "full"`) as the binding that you are trying to disable. Now, the
context predicates of disabled key bindings are evaluated just like any
other context predicate (with the current context) to see if they apply.

Release Notes:

- Fixed an issue where disabling key bindings didn't work. To disable a
key binding, set it to `null` in your keymap.
```

## Parents

- [be98ff408e2f72ad54c2255fc18df8775c366361](https://git.cafe/gitcafe/zed/commit/be98ff408e2f72ad54c2255fc18df8775c366361?format=markdown)

- [8a96562adfa1a0fc9eba19bdd245d1cac7eed6fe](https://git.cafe/gitcafe/zed/commit/8a96562adfa1a0fc9eba19bdd245d1cac7eed6fe?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7e810d7e0d1e9672696e4ad52d1211603ee7f8bf?format=markdown)
