# Simplify input handling \(\#3282\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8c44f6a81422a05ae76f3e04ab8d34d23086bee2

Requested commit: 8c44f6a81422a05ae76f3e04ab8d34d23086bee2

Commit: 8c44f6a81422a05ae76f3e04ab8d34d23086bee2

Tree: fe7e6c5946bf05673f5a106ff991c040c9089c1e

Author: Nathan Sobo

Committer: GitHub

## Message

```
Simplify input handling (#3282)

This PR takes a different approach to input handling.

Rather than returning the optional input handler, focus handle pair from
the element trait, we instead allow you to register an input handler
imperatively on the window context with `WindowContext::handle_input`.
You pass a focus handle reference and any implementer of
`PlatformInputHandler`. There's an `ElementInputHandler<V>` that
implements `PlatformWindowHandler` so long as `V` implements
`InputHandler`.

Release Notes:

- N/A
```

## Parents

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

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

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