Support for Back button Key on Android (#7073)

When your press a Back button on Android (for example at
`native-activity`), [Winit translates this
key](https://github.com/rust-windowing/winit/blob/47b938dbe78702d521c2c7a43b6f741a3bb8cb0b/src/platform_impl/android/keycodes.rs#L237C42-L237C53)
as `NamedKey::BrowserBack`. Added convertion to `Key::Escape` at
`egui-winit` module.

---------

Co-authored-by: Advocat <advocat@ogr.local>
This commit is contained in:
ardocrat
2025-06-16 01:28:27 +02:00
committed by GitHub
co-authored by Advocat
parent a126be4dc1
commit 742da95bd7
2 changed files with 14 additions and 1 deletions
+2
View File
@@ -1144,6 +1144,8 @@ fn key_from_named_key(named_key: winit::keyboard::NamedKey) -> Option<egui::Key>
NamedKey::F33 => Key::F33,
NamedKey::F34 => Key::F34,
NamedKey::F35 => Key::F35,
NamedKey::BrowserBack => Key::BrowserBack,
_ => {
log::trace!("Unknown key: {named_key:?}");
return None;