# keymap: Allow modifiers as keys \(\#12047\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0b1a589183702e68df618b1caf24671a2ce0c42c

Requested commit: 0b1a589183702e68df618b1caf24671a2ce0c42c

Commit: 0b1a589183702e68df618b1caf24671a2ce0c42c

Tree: 6079de5afc20c0bc1d5410e8a8160f2e637520df

Author: Dov Alperin

Committer: GitHub

## Message

```
keymap: Allow modifiers as keys (#12047)

It is sometimes desirable to allow modifers to serve as keys themselves
for the purposes of keybinds. For example, the popular keybind in
jetbrains IDEs `shift shift` which opens the file finder.

This change treats modifers in the keymaps as keys themselves if they
are not accompanied by a key they are modifying.

Further this change wires up they key dispatcher to treat modifer change
events as key presses which are considered for matching against
keybinds.


Release Notes:

- Fixes #6460

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
```

## Parents

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

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