# More keybindings in macOs modals with buttons · gitcafe/zed

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

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

Visibility: public

Requested revision: 1398a1206299cbaf5e14b9de30d2fbfe83f04334

Requested commit: 1398a1206299cbaf5e14b9de30d2fbfe83f04334

Commit: 1398a1206299cbaf5e14b9de30d2fbfe83f04334

Tree: f61592cf84de25b4252ee0f3f07a21790aacb47b

Author: Kirill Bulatov

Committer: Kirill Bulatov

## Message

```
More keybindings in macOs modals with buttons

Closes https://github.com/zed-industries/community/issues/1095
by forcing the non-Cancel button to get a focus.
Due to the way macOs handles buttons on modals, the focus gain had to be
achieved via certain button addition order, rather than conventional
"setFocus"-ish API, see the related comment for details.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>

```

## Parents

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

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