-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support for Back button Key on Android #7073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Preview available at https://egui-pr-preview.github.io/pr/7073-backbuttonandroid |
I think |
Hmm, I think a new back key would be nicer. There are some cases where I'd expect pressing back and pressing escape to do different things. E.g. pressing escape should clear focus while pressing back should take you back to the previous page even if something is focused. |
Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
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 <[email protected]>
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 <[email protected]>
When your press a Back button on Android (for example at
native-activity
), Winit translates this key asNamedKey::BrowserBack
. Added convertion toKey::Escape
ategui-winit
module.