Platform keyboard event handling
We just landed [druid#1049](https://github.com/linebender/druid/pull/1049), which significantly reworks and improves keyboard event handling in Druid. In particular, I think it has a really good implementation of platform keyboard handling on Windows, and good enough on macOS, Gtk, and Web. Windows keyboard handling is especially tricky to get right, and in researching this I found a range of implementation quality from hopelessly broken to basically right but quite complex (particularly the browser implementations).
Another nice feature of this patch is that we're moving more towards standard types - it's using the [keyboard-types](https://crates.io/crates/keyboard-types) crate (though doing a few of our own newtypes, and having conversations with upstream about converging even more).
I should also point out that the larger task of keyboard handling is still work in progress. There are some things to fix about hotkeys (especially with non-Latin keyboard layouts), and we don't yet do IME.
The reason I am posting here, rather than just on our Zulip, is that I'd like to open some discussion about how to improve things across the ecosystem, not just in Druid. The simplest thing is for people responsible for other UI platform bindings to be aware of our implementation, study it, and adapt it.
Are there other ways the ecosystem can work together? Should we be investing in "vocabulary types" like keyboard-types? What are the best ways to do this without running into difficult coordination problems?
Discussion welcome.
https://redd.it/hi9aq2
@r_rust
We just landed [druid#1049](https://github.com/linebender/druid/pull/1049), which significantly reworks and improves keyboard event handling in Druid. In particular, I think it has a really good implementation of platform keyboard handling on Windows, and good enough on macOS, Gtk, and Web. Windows keyboard handling is especially tricky to get right, and in researching this I found a range of implementation quality from hopelessly broken to basically right but quite complex (particularly the browser implementations).
Another nice feature of this patch is that we're moving more towards standard types - it's using the [keyboard-types](https://crates.io/crates/keyboard-types) crate (though doing a few of our own newtypes, and having conversations with upstream about converging even more).
I should also point out that the larger task of keyboard handling is still work in progress. There are some things to fix about hotkeys (especially with non-Latin keyboard layouts), and we don't yet do IME.
The reason I am posting here, rather than just on our Zulip, is that I'd like to open some discussion about how to improve things across the ecosystem, not just in Druid. The simplest thing is for people responsible for other UI platform bindings to be aware of our implementation, study it, and adapt it.
Are there other ways the ecosystem can work together? Should we be investing in "vocabulary types" like keyboard-types? What are the best ways to do this without running into difficult coordination problems?
Discussion welcome.
https://redd.it/hi9aq2
@r_rust