Commit a9baf5e
committed
fix(android): Populate
The `text` field on `KeyEvent` was hardcoded to `None` on Android,
making it impossible for custom `NativeActivity` subclasses that
show the IME to receive functional text input using *for example* the
existing `winit-egui` crate which relies on this field being set.
Use `Key::to_text()` on press events to derive `text` from
`logical_key`, matching the convention used by the Windows and macOS
backends.
Supposedly that doesn't include all kinds of special virtual unicode
keys, but at least the basics work this way.KeyEvent.text via Key::to_text()
1 parent 6bb43fd commit a9baf5e
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
449 | 456 | | |
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
456 | | - | |
| 463 | + | |
457 | 464 | | |
458 | 465 | | |
459 | | - | |
| 466 | + | |
460 | 467 | | |
461 | 468 | | |
462 | 469 | | |
| |||
0 commit comments