# Make keymaps reusable across platforms \(\#10811\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7f81bfb6b7ad3dfecc5df67b8ce6519f3179fdc8

Requested commit: 7f81bfb6b7ad3dfecc5df67b8ce6519f3179fdc8

Commit: 7f81bfb6b7ad3dfecc5df67b8ce6519f3179fdc8

Tree: ad749ec7867094f385f062c92c2e1866aabf9362

Author: ElKowar

Committer: GitHub

## Message

```
Make keymaps reusable across platforms (#10811)

This PR includes two relevant changes:
- Platform binds (super, windows, cmd) will now parse on all platforms,
regardless of which one is being used. While very counter-intuitive
(this means that `cmd-d` will actually be triggered by `win-d` on
windows) this makes it possible to reuse keymap files across platforms
easily
- There is now a KeyContext `os == linux`, `os == macos` or `os ==
windows` available in keymaps. This allows users to specify certain
blocks of keybinds only for one OS, allowing you to minimize the amount
of keymappings that you have to re-configure for each platform.

Release Notes:

- Added `os` KeyContext, set to either `linux`, `macos` or `windows`
- Fixed keymap parsing errors when `cmd` was used on linux, `super` was
used on mac, etc.
```

## Parents

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

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