Merge KeyEventExtra into KeyEvent (#4029)

To make the fields easier to use, and to allow constructing KeyEvent in
user test code.
This commit is contained in:
Mads Marquart 2025-02-26 17:51:49 +01:00 committed by GitHub
parent 6c0e3c3b15
commit 0c89ea7386
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 71 additions and 135 deletions

View file

@ -96,9 +96,6 @@ impl RedrawRequester {
}
}
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct KeyEventExtra {}
pub struct EventLoop {
pub(crate) android_app: AndroidApp,
window_target: ActiveEventLoop,
@ -478,7 +475,8 @@ impl EventLoop {
location: keycodes::to_location(keycode),
repeat: key.repeat_count() > 0,
text: None,
platform_specific: KeyEventExtra {},
text_with_all_modifiers: None,
key_without_modifiers: keycodes::to_logical(key_char, keycode),
},
is_synthetic: false,
};