Started playing about with VirtualKeyCode on Android, and it seems there's no mapping for KeyCode::Back which would be needed to handle a graceful app exit (or going to the previous page) when the user presses it. The implementation for VirtualKeyCode::Back reads:
|
/// The Backspace key, right over Enter. |
|
// TODO: rename |
|
Back, |
So I don't think we should add a new Back VirtualKeyCode and rename existing uses to Backspace, as that's really hard to notice for end-users upgrading their winit. Perhaps we can piggyback NavigateBackward but android already supports that as KeyCode::NavigatePrevious:
Keycode::Back => Some(VirtualKeyCode::NavigateBackward),
How do you think we should go forward?
Originally posted by @MarijnS95 in #2226 (comment)
Started playing about with
VirtualKeyCodeon Android, and it seems there's no mapping forKeyCode::Backwhich would be needed to handle a graceful app exit (or going to the previous page) when the user presses it. The implementation forVirtualKeyCode::Backreads:winit/src/event.rs
Lines 962 to 964 in f04fa5d
So I don't think we should add a new
BackVirtualKeyCodeand rename existing uses toBackspace, as that's really hard to notice for end-users upgrading theirwinit. Perhaps we can piggybackNavigateBackwardbut android already supports that asKeyCode::NavigatePrevious:How do you think we should go forward?
Originally posted by @MarijnS95 in #2226 (comment)